{"openapi":"3.1.0","info":{"title":"Products and Customers","version":"1.0.0","description":"API reference for storing a seller's product catalogue and customer records: create, list, update and delete products and customers, authenticated with a JWT from `POST /auth/token`."},"servers":[{"url":"https://sandbox.payme.io/api","description":"Sandbox"},{"url":"https://live.payme.io/api","description":"Production"}],"paths":{"/auth/token":{"post":{"operationId":"post-auth-token","summary":"Generate JWT Token","tags":["Authentication"],"description":"Generates a new JWT token using the client key and seller key.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"mpl":{"type":"string"},"key":{"type":"string"}}},"example":{"mpl":"MPLMPL","key":"clientkey"}}}},"responses":{"200":{"description":"Token generated successfully.","x-response-kind":"success","content":{"application/json":{"schema":{"type":"object","properties":{"access_token":{"type":"string","description":"The generated JWT token."},"refresh_token":{"type":"string","description":"The type of the token, typically 'Bearer'."}}}}}},"400":{"description":"Bad Request","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"status_code":{"type":"integer"},"message":{"type":"string"},"status_error_code":{"type":"integer"}}}}}},"401":{"description":"Unauthorized","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"status_code":{"type":"integer"},"message":{"type":"string"},"status_error_code":{"type":"integer"}}}}}},"500":{"description":"Internal Server Error","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"status_code":{"type":"integer"},"message":{"type":"string"},"status_error_code":{"type":"integer"}}}}}}}}},"/auth/refresh":{"post":{"security":[{"partnerKey":[],"merchantKey":[]}],"operationId":"post-auth-refresh","summary":"Refresh JWT Token","tags":["Authentication"],"description":"Refreshes an existing JWT token using the refresh token.","parameters":[{"name":"PayMe-Partner-Key","in":"header","required":true,"description":"The unique Partner identifier.","schema":{"type":"string"}},{"name":"PayMe-Merchant-Key","in":"header","required":true,"description":"The unique Seller identifier.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"refresh_token":{"type":"string","description":"The refresh token."}},"required":["refresh_token"]}}}},"responses":{"200":{"description":"Token refreshed successfully.","x-response-kind":"success","content":{"application/json":{"schema":{"type":"object","properties":{"access_token":{"type":"string","description":"The new JWT token."},"expires_in":{"type":"integer","description":"The expiration time of the token in seconds."}}}}}},"400":{"description":"Bad Request","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"status_code":{"type":"integer"},"message":{"type":"string"},"status_error_code":{"type":"integer"}}}}}},"401":{"description":"Unauthorized","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"status_code":{"type":"integer"},"message":{"type":"string"},"status_error_code":{"type":"integer"}}}}}},"500":{"description":"Internal Server Error","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"status_code":{"type":"integer"},"message":{"type":"string"},"status_error_code":{"type":"integer"}}}}}}}}},"/products":{"get":{"security":[{"bearerAuth":[]}],"operationId":"get-products","summary":"Get Products","tags":["Products"],"description":"The GET /products endpoint provides access to product data, enabling clients to filter and sort through available products. Clients can specify parameters such as product status, creation date range, currency, description, order columns, and directions. Additionally, the endpoint allows for pagination and setting price ranges.\n\nThe response will include a list of products that match the specified query parameters, along with metadata such as the total number of products available and pagination details. This endpoint is essential for applications that require dynamic and flexible product searches.","parameters":[{"name":"status","in":"query","required":true,"description":"The product status - indicates if the product is available or not.","schema":{"type":"string"}},{"name":"created_at[]","in":"query","required":false,"description":"Common date range. Use [min] / [max] on query parameters.","schema":{"type":"string"}},{"name":"due_date","in":"query","required":false,"description":"Common date range. Use [min] / [max] on query parameters.","schema":{"type":"string"}},{"name":"items_per_page","in":"query","required":false,"description":"The count of items returned under the page, up to 500 per page. ","schema":{"type":"integer"}},{"name":"page","in":"query","required":false,"description":"The page number","schema":{"type":"integer"}},{"name":"name","in":"query","required":false,"description":"The product name.","schema":{"type":"string"}},{"name":"description","in":"query","required":false,"description":"The product description.","schema":{"type":"string"}},{"name":"currency","in":"query","required":false,"description":"The product currency - ISO 3 letters.","schema":{"type":"string"}},{"name":"price_inc_vat_min","in":"query","required":false,"description":"The minimum price include VAT -> Store Price only. (store_configuration)","schema":{"type":"number"}},{"name":"price_inc_vat_max","in":"query","required":false,"description":"The maximum price include VAT -> Store price only. (store_configuration)","schema":{"type":"number"}},{"name":"sort_by","in":"query","required":false,"description":"The column name that will be used for ordering the results.","schema":{"type":"string"}},{"name":"sort_direction","in":"query","required":false,"description":"The direction of ordering.","schema":{"type":"string"}}],"responses":{"200":{"description":"Request validated.","x-response-kind":"success","content":{"application/json":{"schema":{"type":"object","properties":{"guid":{"type":"string"},"product_remote_id":{"type":"string"},"name":{"type":"string"},"status":{"type":"integer"},"category":{"type":"string"},"description":{"type":"string"},"store_prices":{"type":"object","properties":{"currency":{"type":"string"},"vat_free":{"type":"boolean"},"price_without_vat":{"type":"number"},"price_include_vat":{"type":"number"}}},"costs":{"type":"object","properties":{"currency":{"type":"string"},"vat_free":{"type":"boolean"},"price_without_vat":{"type":"integer"},"price_include_vat":{"type":"number"}}}}},"example":{"guid":"PRODUCT123-123-123-123","product_code":"PROD001","name":"Example Product","status":1,"category":3,"description":"This is a description of the example product.","store_configuration":{"currency":"USD","vat_free":false,"Price_without_vat":99.99,"Price_include_vat":117.99},"costs_details":{"currency":"USD","vat_free":false,"Price_without_vat":50,"Price_include_vat":58.5}}}}},"400":{"description":"Bad Request","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","properties":{"error_text":{"type":"string"},"error_code":{"type":"string"}}}}},"example":{"status_code":1,"message":"Bad Request","status_error_code":400}}}},"401":{"description":"Unauthorized","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"status_code":{"type":"integer"},"message":{"type":"string"},"status_error_code":{"type":"integer"}}},"example":{"status_code":1,"message":"unauthorized request","status_error_code":401}}}},"500":{"description":"Internal Server Error","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"status_code":{"type":"integer"},"message":{"type":"string"},"status_error_code":{"type":"integer"}}},"example":{"status_code":1,"message":"Internal Server Error","status_error_code":500}}}}}},"post":{"security":[{"bearerAuth":[]}],"operationId":"post-user","summary":"Create New Product","tags":["Products"],"description":"This endpoint is an essential part of the product management system. \n\nThe endpoint allows clients to add new products to the system by sending the necessary information in the request.\n\n","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"product_remote_id":{"type":"string","description":"The extneral product identifier."},"name":{"type":"string","description":"The name of the product.\n"},"status":{"type":"integer","description":"The status of the product.\nOptions:\n1 = `Available`, 0 = `Not Available`"},"description":{"type":"string","description":"The product description.\n\nMaximum Length = 75 Characters. "},"store_prices":{"type":"object","description":"The item store configuration.","properties":{"currency":{"type":"string","description":"3 Letter ISO."},"is_vat_free":{"type":"boolean","description":"The VAT indicator. "},"price_without_vat":{"type":"number","description":"Price without VAT."},"price_include_vat":{"type":"number","description":"Price with VAT."}}},"costs":{"type":"object","description":"The item costs object.","properties":{"currency":{"type":"string","description":"3 Letter ISO."},"is_vat_free":{"type":"boolean","description":"The VAT indicator. "},"price_without_vat":{"type":"number","description":"The price without VAT."},"price_include_vat":{"type":"number","description":"The price including VAT."}}}},"required":["name","status","description"]},"example":{"payme_client_key":"your_payme_client_key","seller_payme_id":"seller789","product_code":"PROD003","name":"Detailed Costs Product","status":0,"category":2,"description":"This product includes detailed cost information.","item_sale_details":{"currency":"GBP","vat_free":false,"Price_without_vat":150,"Price_include_vat":180},"item_costs_details":{"currency":"GBP","vat_free":false,"Price_without_vat":70,"Price_include_vat":84}}}},"description":"Post the necessary fields for the API to create a new user."},"responses":{"200":{"description":"Product created successfully.\n","x-response-kind":"success","content":{"application/json":{"schema":{"type":"object","properties":{"created_at":{"type":"string","description":"The timestamp of the creation."},"guid":{"type":"integer","description":"The unique PayMe product identifier."}}},"example":{"status_code":0,"message":"OK","Created_date":"2024-05-16T00:00:00Z","Payme_product_id":1234567890}}}},"400":{"description":"Bad Request","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"The error text message."},"status_error_code":{"type":"integer","description":"The error code."}}},"example":{"status_code":1,"message":"Bad Request","status_error_code":400}}}},"401":{"description":"Unauthorized","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"The error text message."},"status_error_code":{"type":"integer","description":"The error code."}}},"example":{"status_code":1,"message":"Unauthorized request","status_error_code":401}}}},"500":{"description":"Internal Server Error","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"The error text message."},"status_error_code":{"type":"integer"}}},"example":{"status_code":1,"message":"Internal Server Error","status_error_code":500}}}}}}},"/products/{guid}":{"get":{"security":[{"bearerAuth":[]}],"operationId":"get-products-guid","summary":"Get by Product Guid","tags":["Products"],"description":"The `GET /products/guid` endpoint provides access to product data, enabling clients to filter and sort through available products. Clients can specify parameters such as product status, creation date range, currency, description, order columns, and directions. Additionally, the endpoint allows for pagination and setting price ranges.\n\nThe response will include a list of products that match the specified query parameters, along with metadata such as the total number of products available and pagination details. This endpoint is essential for applications that require dynamic and flexible product searches.","parameters":[{"name":"guid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","x-response-kind":"success","content":{"application/json":{"schema":{"type":"object","properties":{"guid":{"type":"string","description":"The Product unique identifier."},"product_remote_id":{"type":"string"},"name":{"type":"string","description":"The product name."},"status":{"type":"integer","description":"The status of the product.\nOptions:\n1 = `Available`, 0 = `Not Available`"},"description":{"type":"string","description":"The product description."},"store_configuration":{"type":"object","properties":{"currency":{"type":"string","description":"The product store currency.\n3 Letter ISO Format"},"vat_free":{"type":"boolean","description":"The VAT Indicator of the product."},"price_without_vat":{"type":"number","description":"The price of the product, excluding VAT."},"price_include_vat":{"type":"number","description":"The price of the product, including VAT."}}},"costs_details":{"type":"object","properties":{"currency":{"type":"string","description":"The product store currency.\n3 Letter ISO Format"},"vat_free":{"type":"boolean","description":"The VAT Indicator of the product."},"price_without_vat":{"type":"number","description":"The price of the product, excluding VAT."},"price_include_vat":{"type":"number","description":"The price of the product, including VAT."}}}}},"example":{"guid":"string","product_code":"string","name":"string","status":0,"category":0,"description":"string","store_configuration":{"currency":"string","vat_free":true,"Price_without_vat":0,"Price_include_vat":0},"costs_details":{"currency":"string","vat_free":true,"Price_without_vat":0,"Price_include_vat":0}}}}},"400":{"description":"Bad Request","x-response-kind":"error"},"401":{"description":"Unauthorized","x-response-kind":"error"},"500":{"description":"Internal Server Error","x-response-kind":"error"}}},"patch":{"security":[{"bearerAuth":[]}],"operationId":"patch-products-product-id","summary":"Update Product","tags":["Products"],"description":"The patch-product endpoint allows for partial updates to an existing product's details using `guid` as the identifier. Below is an example JSON payload for a PATCH request to update various fields of a product.","parameters":[{"name":"guid","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The name of the product."},"status":{"type":"integer","description":"The status of the product.\nOptions:\n1 = `Available`, 0 = `Not Available`"},"description":{"type":"string","description":"The description of the product."},"store_configuration":{"type":"object","description":"The item store configurations object.","properties":{"currency":{"type":"string","description":"The currency of the item in the store.\n3 Letter ISO"},"is_vat_free":{"type":"boolean","description":"The item VAT indicator."},"price_without_vat":{"type":"number","description":"The price without VAT."},"price_include_vat":{"type":"number","description":"The price including VAT."}}},"costs_details":{"type":"object","description":"The item costs object.","properties":{"currency":{"type":"string","description":"The currency of the item in the store.\n3 Letter ISO"},"is_vat_free":{"type":"boolean","description":"The item VAT indicator."},"price_without_vat":{"type":"number","description":"The price without VAT."},"price_include_vat":{"type":"number","description":"The price including VAT."}}}}},"example":{"payme_client_key":"your_payme_client_key","seller_payme_id":"seller123","guid":"PRDCT001-123-123","name":"Example Product","status":1,"category":3,"description":"This is a description of the example product.","item_sale_details":{"currency":"USD","vat_free":false,"Price_without_vat":99.99,"Price_include_vat":117.99},"item_costs_details":{"currency":"USD","vat_free":false,"Price_without_vat":50,"Price_include_vat":58.5}}}}},"responses":{"200":{"description":"OK","x-response-kind":"success","content":{"application/json":{"schema":{"type":"object","properties":{"guid":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}}}}}},"400":{"description":"Bad Request","x-response-kind":"error"},"401":{"description":"Unauthorized","x-response-kind":"error"},"500":{"description":"Internal Server Error","x-response-kind":"error"}}},"delete":{"security":[{"bearerAuth":[]}],"operationId":"delete-products-guid","summary":"Delete Product","tags":["Products"],"description":"The delete-product endpoint is a critical component of the product management system. It allows clients to remove products from the available products list based on specific identifiers. This operation is essential for maintaining an up-to-date and accurate product catalog, ensuring that obsolete or discontinued items are no longer available in the inventory.\n\n","parameters":[{"name":"guid","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"example":{"payme_client_key":"360_project_client_key","seller_payme_id":"seller_identifier","guid":"guid value"}}}},"responses":{"200":{"description":"OK","x-response-kind":"success","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"The text indicator of the action requested to delete the product."},"guid":{"type":"string","description":"The unique PayMe Product identifier."}}},"example":{"status_code":0,"message":"Product deleted successfully","guid":"PRDCT123-123-123"}}}},"400":{"description":"Bad Request","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"status_code":{"type":"integer","description":"```1 = Failure, 0 = Sucess ```"},"message":{"type":"string","description":"The error text message."},"status_error_code":{"type":"integer","description":"The error code."}}},"example":{"status_code":1,"message":"Bad Request","status_error_code":400}}}},"401":{"description":"Unauthorized","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"status_code":{"type":"integer","description":"```1 = Failure, 0 = Sucess ```"},"message":{"type":"string","description":"The error text message."},"status_error_code":{"type":"integer","description":"The error code."}}},"example":{"status_code":1,"message":"Unauthorized request","status_error_code":401}}}},"500":{"description":"Internal Server Error","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"status_code":{"type":"integer","description":"```1 = Failure, 0 = Sucess ```"},"message":{"type":"string","description":"The error text message."},"status_error_code":{"type":"integer","description":"The error code."}}},"example":{"status_code":1,"message":"Internal Server Error","status_error_code":500}}}}}}},"/customers":{"get":{"security":[{"bearerAuth":[]}],"operationId":"get-customers","summary":"Get Customers","tags":["Customers"],"description":"The GET /customers endpoint provides access to customer data, enabling clients to filter and sort through available customers.","parameters":[{"name":"status","in":"query","required":false,"description":"The customer status - indicates if the customer is available or not. 0 - Deacativated, 1 - Active, 2 - Draft","schema":{"type":"boolean"}},{"name":"created_at","in":"query","required":false,"description":"Common date range. Use [min] / [max] on query parameters.","schema":{"type":"string"}},{"name":"due_date","in":"query","required":false,"description":"Common date range. Use [min] / [max] on query parameters.","schema":{"type":"string"}},{"name":"items_per_page","in":"query","required":false,"description":"The number of items per page.","schema":{"type":"integer"}},{"name":"page","in":"query","required":false,"description":"The page number.","schema":{"type":"integer"}},{"name":"first_name","in":"query","required":false,"description":"The customer's first name.","schema":{"type":"string"}},{"name":"last_name","in":"query","required":false,"description":"The customer's last name.","schema":{"type":"string"}},{"name":"email","in":"query","required":false,"description":"The customer's email.","schema":{"type":"string"}},{"name":"phone_number","in":"query","required":false,"description":"The customer's phone number.","schema":{"type":"string"}},{"name":"description","in":"query","required":false,"description":"The customer description.","schema":{"type":"string"}},{"name":"sort_by","in":"query","required":false,"description":"The column name for ordering results.","schema":{"type":"string"}},{"name":"sort_direction","in":"query","required":false,"description":"The direction for ordering results.","schema":{"type":"string"}}],"responses":{"200":{"description":"User Found","x-response-kind":"success","content":{"application/json":{"schema":{"type":"object","properties":{"items_count":{"type":"integer"},"items":{"type":"array","items":{"type":"object","properties":{"guid":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"email":{"type":"string"},"phone_number":{"type":"string"},"additional_phone_number":{"type":"string"},"country":{"type":"string"},"city":{"type":"string"},"street":{"type":"string"},"building_number":{"type":"string"},"floor":{"type":"string"},"zip":{"type":"string"},"middle_name":{"type":"string"},"company_name":{"type":"string"},"gender":{"type":"string"},"description":{"type":"string"},"birthday":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"status":{"type":"integer","description":"The status of the product.\nOptions:\n1 = `Available`, 0 = `Not Available`"},"payment_tokens":{"type":"object","properties":{"payment_method":{"type":"string","description":"The payment method of the token.\nAllowed values:\n1. `Credit Card`\n2. `IL Direct Debit`"},"token_guid":{"type":"string","description":"The unique identifier of the token in PayMe.\n"}}}}}}}},"example":{"items_count":1,"items":[{"guid":"string","first_name":"string","last_name":"string","email":"string","phone_number":"string","additional_phone_number":"string","country":"string","city":"string","street":"string","building_number":"string","floor":"string","zip":"string","middle_name":"string","company_name":"string","gender":"string","description":"string","birthday":"2019-08-24","created_date":"2019-08-24","update_date":"2019-08-24","status":0,"payment_tokens":{"payment_method":"string","token_guid":"string"}}]}}}},"400":{"description":"Bad Request","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"status_error_code":{"type":"integer"}}}}}},"401":{"description":"Unauthorized","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"status_error_code":{"type":"integer"}}}}}},"500":{"description":"Internal Server Error","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"status_error_code":{"type":"integer"}}}}}}}},"post":{"security":[{"bearerAuth":[]}],"operationId":"post-customers","summary":"Create New Customer","tags":["Customers"],"description":"This endpoint allows clients to add new customers to the system by sending the necessary information in the request.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"customer_remote_id":{"type":"string","description":"The customer's first name."},"first_name":{"type":"string","description":"The customer's first name."},"last_name":{"type":"string","description":"The customer's last name."},"email":{"type":"string","description":"The customer's email."},"phone_number":{"type":"string","description":"The customer's mobile number."},"country":{"type":"string","description":"The customer's country."},"city":{"type":"string","description":"The customer's city."},"street":{"type":"string","description":"The customer's street."},"building_number":{"type":"string","description":"The customer's building number."},"floor":{"type":"string","description":"The customer's floor."},"zip":{"type":"string","description":"The customer's ZIP code."},"middle_name":{"type":"string","description":"The customer's middle name."},"company_name":{"type":"string","description":"The customer's company name."},"gender":{"type":"string","description":"The customer's gender.\nAllowed values:\n1. `Male`\n2. `Female`\n3. `Other`"},"description":{"type":"string","description":"The customer description."},"birthday":{"type":"string","description":"The customer's birthday.\n\nMM-DD-YYYY Format"},"additional_phone":{"type":"string","description":"Additional phone number of the customer."},"payment_tokens":{"type":"object","properties":{"payment_method":{"type":"string","description":"The payment method of the token.\nAllowed values:\n1. `Credit Card`\n2. `IL Direct Debit`"},"token_guid":{"type":"string","description":"The unique identifier of the token in PayMe.\n"}}}},"required":["first_name","last_name","email","phone_number"]}}}},"responses":{"200":{"description":"Customer created successfully.","x-response-kind":"success","content":{"application/json":{"schema":{"type":"object","properties":{"guid":{"type":"integer","description":"The unique PayMe customer identifier."},"created_at":{"type":"string","description":"The timestamp of the creation."}}}}}},"400":{"description":"Bad Request","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"status_error_code":{"type":"integer"}}}}}},"401":{"description":"Unauthorized","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"status_error_code":{"type":"integer"}}}}}},"500":{"description":"Internal Server Error","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"status_error_code":{"type":"integer"}}}}}}}}},"/customers/{guid}":{"get":{"security":[{"bearerAuth":[]}],"operationId":"get-customers-guid","summary":"Get by Customer Guid","tags":["Customers"],"parameters":[{"name":"guid","in":"path","required":true,"description":"The unique PayMe customer identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","x-response-kind":"success","content":{"application/json":{"schema":{"type":"object","properties":{"items_count":{"type":"integer"},"items":{"type":"array","items":{"type":"object","properties":{"guid":{"type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"email":{"type":"string"},"phone_number":{"type":"string"},"additional_phone_number":{"type":"string"},"country":{"type":"string"},"city":{"type":"string"},"street":{"type":"string"},"building_number":{"type":"string"},"floor":{"type":"string"},"zip":{"type":"string"},"middle_name":{"type":"string"},"company_name":{"type":"string"},"gender":{"type":"string"},"description":{"type":"string"},"birthday":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"status":{"type":"integer"},"payment_tokens":{"type":"object","properties":{"payment_method":{"type":"string"},"token_guid":{"type":"string"}}}}}}}},"example":{"items_count":1,"items":[{"guid":"string","first_name":"string","last_name":"string","email":"string","phone_number":"string","additional_phone_number":"string","country":"string","city":"string","street":"string","building_number":"string","floor":"string","zip":"string","middle_name":"string","company_name":"string","gender":"string","description":"string","birthday":"2019-08-24","created_date":"2019-08-24","update_date":"2019-08-24","status":0,"payment_tokens":{"payment_method":"string","token_guid":"string"}}]}}}},"400":{"description":"Bad Request","x-response-kind":"error"},"401":{"description":"Unauthorized","x-response-kind":"error"},"500":{"description":"Internal Server Error","x-response-kind":"error"}}},"patch":{"security":[{"bearerAuth":[]}],"operationId":"patch-customers","summary":"Update Customer","tags":["Customers"],"description":"Update customer details.","parameters":[{"name":"guid","in":"path","required":true,"description":"The unique PayMe customer identifier.","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"customer_remote_id":{"type":"string","description":"The unique identifier for the customer."},"first_name":{"type":"string","description":"The customer's first name."},"middle_name":{"type":"string","description":"The customer's middle name."},"last_name":{"type":"string","description":"The customer's last name."},"email":{"type":"string","description":"The customer's email."},"phone_number":{"type":"string","description":"The customer's mobile number."},"additional_phone_number":{"type":"string","description":"Additional phone number of the customer."},"country":{"type":"string","description":"The customer's country."},"city":{"type":"string","description":"The customer's city."},"street":{"type":"string","description":"The customer's street."},"building_number":{"type":"string","description":"The customer's building number."},"floor":{"type":"string","description":"The customer's floor."},"zip":{"type":"string","description":"The customer's ZIP code."},"company_name":{"type":"string","description":"The customer's company name."},"gender":{"type":"string","description":"The customer's gender."},"description":{"type":"string","description":"The customer description."},"birthday":{"type":"string","description":"The customer's birthday."},"payment_tokens":{"type":"object","properties":{"payment_method":{"type":"string","description":"The payment method of the token.\nAllowed values:\n1. `Credit Card`\n2. `IL Direct Debit`"},"token_guid":{"type":"string","description":"The unique identifier of the token in PayMe.\n"}}}}}}}},"responses":{"200":{"description":"Customer updated successfully.","x-response-kind":"success","content":{"application/json":{"schema":{"type":"object","properties":{"created_at":{"type":"string","description":"The timestamp of the update."},"updated_at":{"type":"string","description":"The timestamp of the update."},"guid":{"type":"integer","description":"The unique PayMe customer identifier."}}}}}},"400":{"description":"Bad Request","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"status_code":{"type":"integer"},"message":{"type":"string"},"status_error_code":{"type":"integer"}}}}}},"401":{"description":"Unauthorized","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"status_code":{"type":"integer"},"message":{"type":"string"},"status_error_code":{"type":"integer"}}}}}},"500":{"description":"Internal Server Error","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"status_code":{"type":"integer"},"message":{"type":"string"},"status_error_code":{"type":"integer"}}}}}}}},"delete":{"security":[{"bearerAuth":[]}],"operationId":"delete-customers","summary":"Delete Customer","tags":["Customers"],"description":"Delete a customer by their unique PayMe identifier.","parameters":[{"name":"guid","in":"path","required":true,"description":"The unique PayMe customer identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Customer deleted successfully.","x-response-kind":"success","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"The success message."},"payme_guid":{"type":"string","description":"The unique customer identifier."}}}}}},"400":{"description":"Bad Request","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"status_error_code":{"type":"integer"}}}}}},"401":{"description":"Unauthorized","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"status_error_code":{"type":"integer"}}}}}},"500":{"description":"Internal Server Error","x-response-kind":"error","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"status_error_code":{"type":"integer"}}}}}}}}}},"tags":[{"name":"Authentication"},{"name":"Products"},{"name":"Customers"}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"partnerKey":{"type":"apiKey","in":"header","name":"PayMe-Partner-Key"},"merchantKey":{"type":"apiKey","in":"header","name":"PayMe-Merchant-Key"}}}}