UNPKG

openapi-directory

Version:

Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS

1 lines 366 kB
{"openapi":"3.0.0","info":{"contact":{"email":"integrations@rebilly.com","name":"Rebilly API Support","url":"https://www.rebilly.com/contact/"},"description":"# Introduction\nThe Rebilly API is built on HTTP. Our API is RESTful. It has predictable\nresource URLs. It returns HTTP response codes to indicate errors. It also\naccepts and returns JSON in the HTTP body. You can use your favorite\nHTTP/REST library for your programming language to use Rebilly's API, or\nyou can use one of our SDKs (currently available in [PHP](https://github.com/Rebilly/rebilly-php)\nand [Javascript](https://github.com/Rebilly/rebilly-js-sdk)).\n\nWe have other APIs that are also available. Every action from our [app](https://app.rebilly.com)\nis supported by an API which is documented and available for use so that you\nmay automate any workflows necessary. This document contains the most commonly\nintegrated resources.\n\n# Authentication\nWhen you sign up for an account, you are given your first API key.\nYou can generate additional API keys, and delete API keys (as you may\nneed to rotate your keys in the future). You authenticate to the\nRebilly API by providing your secret key in the request header.\n\nRebilly offers three forms of authentication: secret key, publishable key, JSON Web Tokens, and public signature key.\n- [Secret API key](#section/Authentication/SecretApiKey): used for requests made from the server side. Never share these keys. Keep them guarded and secure\n- [Publishable API key](#section/Authentication/PublishableApiKey): used for requests from the client side. For now can only be used on the [Tokens resource](#tag/Payment-Tokens%2Fpaths%2F~1tokens%2Fpost)\n- [JWT](#section/Authentication/JWT): short lifetime tokens that can be assigned a specific expiration time\n\nNever share your secret keys. Keep them guarded and secure.\n\n<!-- ReDoc-Inject: <security-definitions> -->\n\n# PHP SDK\nFor all PHP SDK examples provided in this spec you will need to configure `$client`.\nYou may do it like this:\n\n```php\n$client = new Rebilly\\Client([\n 'apiKey' => 'YourApiKeyHere',\n 'baseUrl' => 'https://api.rebilly.com',\n]);\n```\n\n# Using filter\nRebilly provides collections filtering. You can use `?filter` param on collection to define which records should be shown in the response.\n\nHere is filter format description:\n\n- Fields and values in filter are separated with `:`: `?filter=firstName:John`.\n\n- Fields in filter are separated with `;`: `?filter=firstName:John;lastName:Doe`.\n\n- You can use multiple values using `,` as values separator: `?filter=firstName:John,Bob`.\n\n- To negate the filter use `!`: `?filter=firstName:!John`. Note that you can negate multiple values like this: `?filter=firstName:!John,Bob`. This filter rule will exclude all Johns and Bobs from the response.\n\n- You can use range filters like this: `?filter=amount:1..10`.\n\n- You can use gte (greater than or equals) filter like this: `?filter=amount:1..`, or lte (less than or equals) than filter like this: `?filter=amount:..10`.\n\n- You can create some [predefined values lists](https://rebilly.github.io/RebillyUserAPI/#tag/Lists) and use them in filter: `?filter=firstName:@yourListName`. You can also exclude list values: `?filter=firstName:!@yourListName`\n","license":{"name":"Rebilly","url":"https://www.rebilly.com/api-license/"},"termsOfService":"https://www.rebilly.com/terms/","title":"Rebilly","version":"2.1","x-apisguru-categories":["payment","ecommerce"],"x-logo":{"backgroundColor":"#0033A0","url":"https://rebilly.github.io/RebillyAPI/rb_apiLogo.svg"},"x-origin":[{"format":"swagger","url":"http://rebilly.github.io/RebillyAPI/swagger.json","version":"2.0"}],"x-providerName":"rebilly.com"},"security":[{"SecretApiKey":[]},{"JWT":[]}],"tags":[{"description":"3D Secure is a way to authenticate and protect transactions. Typically,\nit's only possible to protect the initial transaction in a subscription\nwith 3D Secure.\n","name":"3D Secure"},{"description":"Bank Accounts are a type of payment instrument used to collect\nACH (echeck) payments, similar to how a payment\ncard would be used to for a credit card payment.\n","name":"Bank Accounts"},{"description":"Your blacklists contains values of customerIds, email addresses,\nipAddresses, bank identification numbers, countries or payment cards that\nyou do NOT want to do business with. They are a good tool for managing\nrisk. A blacklist entry that expires after a period of time we call a\ngreylist.\n","name":"Blacklists"},{"description":"Contacts are Customer's address book.\nAll contact information used in Invoices, Subscriptions, Transacions, etc is enlisted here. Hovewer, changing a Contact won't change corresponding contact information in related resources\n","name":"Contacts"},{"description":"Coupons allows to apply different types of discounts to Invoices, Subscriptions and Plans. Redeemed Coupons will be applied only to Invoices with the same currency.\n","name":"Coupons"},{"description":"Customers are your customers, sometimes known as accounts, clients,\nmembers, patrons, or players in other systems.\n","name":"Customers"},{"description":"Customer KYC files uploaded on behalf of a customer, tagged with a document type\nand submitted for validation.\n","name":"KYC Documents"},{"description":"Create authentication credentials, login, logout, and verify your customers.\n","name":"Customer Authentication"},{"description":"Create additional custom fields for particular resources. You may name,\ndescribe, and determine the type of the schema.\n","name":"Custom Fields"},{"description":"Handle disputes (chargebacks and retrievals).\n","name":"Disputes"},{"description":"A File is an entity that can store a phyiscal file and some metadata. It also provides an easy access to\nits size, mime-type, user-defined tags and description thus allowing easy sorting and searching among stored\nfiles.\nThere are several methods of file uploading available: multipart/form-data encoded form, RAW POST (by sending\nfile contents as POST body), fetching from URL (by providing the file URL via 'url' param)\nAttachment is an entity that is used to link a File to one or multiple objects like Customer, Dispute, Payment,\nTransaction, Subscription, Plan, Product, Invoice, Note. That allows to quickly find and use files related to\nthose specific entities.\n","name":"Files"},{"description":"Invoices leave a record for both you and your customer of the products sold.\n","name":"Invoices"},{"description":"Collect money from your customers with payments. You can schedule a payment\nto occur in the future. You can assign a dunning schedule to a payment to collect\nin the case of a decline.\n\nSome payments may be, what we term, suspended payments. These types of payments\nrequire user interaction. For example, an initial PayPal purchase, a 3D Secure\npurchase, China Union Pay, and more require the customer's interaction to\ncomplete the payment. We call these a \"suspended\" payment flow.\n","name":"Payments"},{"description":"Payment cards are a type of payment instrument used for credit and debit card\nsales. Rebilly securely vaults the full payment card number, and can pass it\nonward securely to any gateway account to transact business.\n","name":"Payment Cards"},{"description":"PayPal Accounts are used for paying with PayPal. We can generate a BAID (billing\nagreement id) which will allow for recurring billing.\n","name":"PayPal Accounts"},{"description":"Payment tokens are used to reduce the scope of PCI DSS compliance. A payment\ntoken can be made using a different authentication scheme (refer to the public key\nauthentication scheme in the Authentication section), which allows you to\ncreate a payment token directly from the browser, bypassing the need to send\nsensitive cardholder info to your servers. We recommend using this with our\nRebilly.js library, which helps you wire a form into this API resource and create\npayment tokens.\n","name":"Payment Tokens"},{"description":"Plans are a template for making a subscription. For example, you may have a plan\nthat has a 30-day free trial followed by a recurring charge of $19.95 per month\nuntil canceled. The combination of the plan and a request to make a subscription\nwill apply those instructions to create the invoices according to the plan's\nschedule.\n","name":"Plans"},{"description":"A product describes what you sell (goods or services). \nA product determines how what you sell appears on invoices and receipts.\nThe pricing for products is set in Plans. One product can have many\nplans.\n","name":"Products"},{"description":"The Rebilly Reporting API is currently experimental. You may see\nthe [Reports API Documentation here](https://rebilly.github.io/RebillyReportsAPI/).\n","name":"Reports"},{"description":"A shipping zone contains regions and countries that you ship to. Each shipping zone has its own shipping rates.\n","name":"Shipping Zones"},{"description":"A subscription applies a plan's template to create invoices for a customer at the\nappropriate scheduled intervals. A subscription may also determine if the payment\nis collected automatically (with autopay set true).\n","name":"Subscriptions"},{"description":"You can map a product to a tax category. The tax category is used by\ntax providers to calculate taxes for invoices.\n","name":"Taxes"},{"description":"Get and refund transactions.\n","name":"Transactions"},{"description":"The Rebilly User API is primarily for our GUI apps. You may see\nthe [User API Documentation here](https://rebilly.github.io/RebillyUserAPI/).\nA User represents a person who can login to Rebilly, and take actions subject to\ntheir granted permissions. It has resources less commonly integrated by\n3rd parties.\n","name":"Users"}],"paths":{"/3dsecure":{"get":{"parameters":[{"$ref":"#/components/parameters/collectionLimit"},{"$ref":"#/components/parameters/collectionOffset"}],"responses":{"200":{"description":"A list was retrieved successfully","headers":{"Pagination-Limit":{"description":"Items per page limit","schema":{"type":"integer"}},"Pagination-Offset":{"description":"Pagination offset","schema":{"type":"integer"}},"Pagination-Total":{"description":"Total items count","schema":{"type":"integer"}},"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"items":{"$ref":"#/components/schemas/ThreeDSecure"},"type":"array"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"}},"summary":"Retrieve a list of ThreeDSecure entries","tags":["3D Secure"]},"post":{"description":"Create a ThreeDSecure entry\n","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ThreeDSecure"}}},"description":"ThreeDSecure resource","required":true},"responses":{"201":{"description":"ThreeDSecure entry was created","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/ThreeDSecure"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"422":{"$ref":"#/components/responses/InvalidDataError"}},"summary":"Create a ThreeDSecure entry","tags":["3D Secure"]}},"/3dsecure/{id}":{"get":{"description":"Retrieve a ThreeDSecure entry with specified identifier string\n","responses":{"200":{"description":"ThreeDSecure entry was retrieved successfully","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/ThreeDSecure"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Retrieve a ThreeDSecure entry","tags":["3D Secure"]},"parameters":[{"$ref":"#/components/parameters/resourceId"}]},"/attachments":{"get":{"description":"Retrieve a list of Attachments\n","parameters":[{"$ref":"#/components/parameters/collectionLimit"},{"$ref":"#/components/parameters/collectionOffset"},{"$ref":"#/components/parameters/collectionFilter"},{"$ref":"#/components/parameters/collectionQuery"},{"$ref":"#/components/parameters/collectionExpand"},{"$ref":"#/components/parameters/collectionFields"},{"description":"The collection items sort field and order (prefix with \"-\" for descending sort).","in":"query","name":"sort","style":"form","explode":false,"schema":{"type":"array","items":{"enum":["id","-id","name","-name","relatedId","-relatedId","relatedType","-relatedType","fileId","-fileId","createdTime","-createdTime","updatedTime","-updatedTime"],"type":"string"}}}],"responses":{"200":{"description":"A list of Attachments was retrieved successfully","headers":{"Pagination-Limit":{"description":"Items per page limit","schema":{"type":"integer"}},"Pagination-Offset":{"description":"Pagination offset","schema":{"type":"integer"}},"Pagination-Total":{"description":"Total items count","schema":{"type":"integer"}},"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"items":{"$ref":"#/components/schemas/Attachment"},"type":"array"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"}},"summary":"Retrieve a list of Attachments","tags":["Files"],"x-code-samples":[{"lang":"PHP","source":"$attachments = $client->attachments()->search([\n 'filter' => 'relatedType:customer',\n]);\n"}]},"post":{"description":"Create an Attachment\n","requestBody":{"$ref":"#/components/requestBodies/Attachment"},"responses":{"201":{"description":"Attachment was created","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Attachment"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"$ref":"#/components/responses/InvalidDataError"}},"summary":"Create an Attachment","tags":["Files"],"x-code-samples":[{"lang":"PHP","source":"$attachmentForm = new Rebilly\\Entities\\Attachment();\n$attachmentForm->setFileId('fileId');\n$attachmentForm->setRelatedType($attachmentForm::TYPE_CUSTOMER);\n$attachmentForm->setRelatedId('customerId');\n\ntry {\n $attachment = $client->attachments()->create($attachmentForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"}]}},"/attachments/{id}":{"delete":{"description":"Delete the Attachment with predefined identifier string\n","responses":{"204":{"description":"Attachment was deleted","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Delete an Attachment","tags":["Files"],"x-code-samples":[{"lang":"PHP","source":"$client->attachments()->delete('attachmentId');\n"}]},"get":{"description":"Retrieve a Attachment with specified identifier string\n","responses":{"200":{"description":"Attachment was retrieved successfully","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Attachment"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Retrieve an Attachment","tags":["Files"],"x-code-samples":[{"lang":"PHP","source":"$attachment = $client->attachments()->load('attachmentId');\n"}]},"parameters":[{"$ref":"#/components/parameters/resourceId"}],"put":{"description":"Update the Attachment with predefined ID\n","requestBody":{"$ref":"#/components/requestBodies/Attachment"},"responses":{"200":{"description":"Attachment was updated","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Attachment"}}}},"201":{"description":"Attachment was created","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Attachment"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"422":{"description":"Invalid data was sent","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/InvalidError"}}}}},"summary":"Update the Attachment with predefined ID","tags":["Files"],"x-code-samples":[{"lang":"PHP","source":"$attachmentForm = new Rebilly\\Entities\\Attachment();\n$attachmentForm->setFileId('fileId');\n$attachmentForm->setRelatedType($attachmentForm::TYPE_CUSTOMER);\n$attachmentForm->setRelatedId('customerId');\n\ntry {\n $attachment = $client->attachments()->update('attachmentId', $attachmentForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"}]}},"/authentication-options":{"get":{"description":"Read current authentication options\n","responses":{"200":{"description":"Current authentication options was retrieved successfully","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"items":{"$ref":"#/components/schemas/AuthenticationOptions"},"type":"array"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"}},"summary":"Read current authentication options","tags":["Customer Authentication"],"x-code-samples":[{"lang":"PHP","source":"$authenticationOptions = $client->authenticationOptions()->load();\n"}]},"put":{"description":"Change options\n","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthenticationOptions"}}},"description":"Authentication Options resource","required":true},"responses":{"200":{"description":"Authentication Options were updated","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/AuthenticationOptions"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"422":{"description":"Invalid data was sent","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/InvalidError"}}}}},"summary":"Change authentication options","tags":["Customer Authentication"],"x-code-samples":[{"lang":"PHP","source":"$authenticationOptionsForm = new Rebilly\\Entities\\AuthenticationOptions();\n// Regular expression below matches any password with 6+ length that contains alphabet symbols and/or numbers.\n$authenticationOptionsForm->setPasswordPattern('/^[a-zA-Z0-9]{6,}$/');\n\ntry {\n $authenticationOptions = $client->authenticationOptions()->update($authenticationOptionsForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"}]}},"/authentication-tokens":{"get":{"description":"Retrieve a list of auth tokens\n","parameters":[{"$ref":"#/components/parameters/collectionLimit"},{"$ref":"#/components/parameters/collectionOffset"}],"responses":{"200":{"description":"A list of auth tokens was retrieved successfully","headers":{"Pagination-Limit":{"description":"Items per page limit","schema":{"type":"integer"}},"Pagination-Offset":{"description":"Pagination offset","schema":{"type":"integer"}},"Pagination-Total":{"description":"Total items count","schema":{"type":"integer"}},"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"items":{"$ref":"#/components/schemas/AuthenticationToken"},"type":"array"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"}},"summary":"Retrieve a list of auth tokens","tags":["Customer Authentication"],"x-code-samples":[{"lang":"PHP","source":"$authenticationTokens = $client->authenticationTokens()->search([\n 'filter' => 'customerId:testCustomer',\n]);\n"}]},"post":{"description":"Login a user (customer)\n","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthenticationToken"}}},"description":"AuthenticationToken resource","required":true},"responses":{"201":{"description":"Login successful","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/AuthenticationToken"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"422":{"description":"Invalid data was sent","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/InvalidError"}}}}},"summary":"Login","tags":["Customer Authentication"],"x-code-samples":[{"lang":"PHP","source":"$authenticationForm = new Rebilly\\Entities\\AuthenticationToken();\n$authenticationForm->setUsername('username');\n$authenticationForm->setPassword('test123');\n\ntry {\n $authenticationToken = $client->authenticationTokens()->login($authenticationForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"}]}},"/authentication-tokens/{token}":{"delete":{"description":"Logout a user\n","responses":{"204":{"description":"User was logged out","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Logout a user","tags":["Customer Authentication"],"x-code-samples":[{"lang":"PHP","source":"$client->authenticationTokens()->logout('token');\n"}]},"get":{"description":"Verify an authentication token\n","responses":{"200":{"description":"Authentication Token was verified","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/AuthenticationToken"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Verify","tags":["Customer Authentication"],"x-code-samples":[{"lang":"PHP","source":"$isVerified = $client->authenticationTokens()->verify('token');\n"}]},"parameters":[{"description":"The token identifier string","in":"path","name":"token","required":true,"schema":{"type":"string"}}]},"/bank-accounts":{"get":{"description":"Retrieve a list of Bank Accounts\n","parameters":[{"$ref":"#/components/parameters/collectionLimit"},{"$ref":"#/components/parameters/collectionOffset"}],"responses":{"200":{"description":"A list of Bank Accounts was retrieved successfully","headers":{"Pagination-Limit":{"description":"Items per page limit","schema":{"type":"integer"}},"Pagination-Offset":{"description":"Pagination offset","schema":{"type":"integer"}},"Pagination-Total":{"description":"Total items count","schema":{"type":"integer"}},"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"items":{"$ref":"#/components/schemas/BankAccount"},"type":"array"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"}},"summary":"Retrieve a list of bank accounts","tags":["Bank Accounts"],"x-code-samples":[{"lang":"PHP","source":"$bankAccounts = $client->bankAccounts()->search([\n 'filter' => 'customerId:testId',\n]);\n"}]},"post":{"description":"Create a Bank Account\n","requestBody":{"$ref":"#/components/requestBodies/BankAccount"},"responses":{"201":{"description":"Bank Account was created","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/BankAccount"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"422":{"description":"Invalid data was sent","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/InvalidError"}}}}},"summary":"Create a Bank Account","tags":["Bank Accounts"],"x-code-samples":[{"lang":"PHP","source":"$bankAccountForm = new Rebilly\\Entities\\BankAccount();\n$bankAccountForm->setCustomerId('customerId');\n$bankAccountForm->setRoutingNumber('0123456');\n$bankAccountForm->setAccountNumber('0123456');\n$bankAccountForm->setAccountType('checking');\n$bankAccountForm->setBillingAddress([\n 'firstName' => 'John',\n 'lastName' => 'Doe',\n 'organization' => 'Test LTD',\n 'address' => 'Test street 5',\n 'address2' => 'Test house 5',\n 'city' => 'New York',\n 'region' => 'Long Island',\n 'country' => 'US',\n 'postalCode' => '123456',\n 'emails' => [\n [\n 'label' => 'main',\n 'value' => 'johndoe@testemail.com',\n 'primary' => true,\n ],\n [\n 'label' => 'secondary',\n 'value' => 'otheremail@testemail.com',\n ],\n ],\n 'phoneNumbers' => [\n [\n 'label' => 'work',\n 'value' => '+123456789',\n 'primary' => true,\n ],\n [\n 'label' => 'home',\n 'value' => '+9874654321',\n ],\n ],\n]);\n\ntry {\n $bankAccount = $client->bankAccounts()->create($bankAccountForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"}]}},"/bank-accounts/{id}":{"get":{"description":"Retrieve a Bank Account with specified identifier string\n","responses":{"200":{"description":"BankAccount was retrieved successfully","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/BankAccount"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Retrieve a Bank Account","tags":["Bank Accounts"],"x-code-samples":[{"lang":"PHP","source":"$bankAccount = $client->bankAccounts()->load('bankAccountId');\n"}]},"parameters":[{"$ref":"#/components/parameters/resourceId"}],"put":{"description":"Create or update a BankAccount with predefined identifier string\n","requestBody":{"$ref":"#/components/requestBodies/BankAccount"},"responses":{"200":{"description":"BankAccount was updated","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/BankAccount"}}}},"201":{"description":"BankAccount was created","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/BankAccount"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"422":{"description":"Invalid data was sent","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/InvalidError"}}}}},"summary":"Create a BankAccount with predefined ID","tags":["Bank Accounts"],"x-code-samples":[{"lang":"PHP","source":"$bankAccountForm = new Rebilly\\Entities\\BankAccount();\n$bankAccountForm->setCustomerId('customerId');\n$bankAccountForm->setRoutingNumber('0123456');\n$bankAccountForm->setAccountNumber('0123456');\n$bankAccountForm->setAccountType('checking');\n$bankAccountForm->setBillingAddress([\n 'firstName' => 'John',\n 'lastName' => 'Doe',\n 'organization' => 'Test LTD',\n 'address' => 'Test street 5',\n 'address2' => 'Test house 5',\n 'city' => 'New York',\n 'region' => 'Long Island',\n 'country' => 'US',\n 'postalCode' => '123456',\n 'emails' => [\n [\n 'label' => 'main',\n 'value' => 'johndoe@testemail.com',\n 'primary' => true,\n ],\n [\n 'label' => 'secondary',\n 'value' => 'otheremail@testemail.com',\n ],\n ],\n 'phoneNumbers' => [\n [\n 'label' => 'work',\n 'value' => '+123456789',\n 'primary' => true,\n ],\n [\n 'label' => 'home',\n 'value' => '+9874654321',\n ],\n ],\n]);\n\ntry {\n $bankAccount = $client->customers()->create($bankAccountForm, 'bankAccountId');\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"}]}},"/bank-accounts/{id}/deactivation":{"parameters":[{"$ref":"#/components/parameters/resourceId"}],"post":{"description":"Deactivate a Bank Account\n","responses":{"201":{"description":"Deactivated successfully","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/BankAccount"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Deactivate a Bank Account","tags":["Bank Accounts"],"x-code-samples":[{"lang":"PHP","source":"$bankAccount = $client->bankAccounts()->deactivate('bankAccountId');\n"}]}},"/blacklists":{"get":{"description":"Retrieve a list of blacklists\n","parameters":[{"$ref":"#/components/parameters/collectionLimit"},{"$ref":"#/components/parameters/collectionOffset"}],"responses":{"200":{"description":"A list of Blacklists was retrieved successfully","headers":{"Pagination-Limit":{"description":"Items per page limit","schema":{"type":"integer"}},"Pagination-Offset":{"description":"Pagination offset","schema":{"type":"integer"}},"Pagination-Total":{"description":"Total items count","schema":{"type":"integer"}},"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"items":{"$ref":"#/components/schemas/Blacklist"},"type":"array"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"}},"summary":"Retrieve a list of blacklists","tags":["Blacklists"],"x-code-samples":[{"lang":"PHP","source":"$blacklists = $client->blacklists()->search([\n 'filter' => 'value:testValue',\n]);\n"}]},"post":{"description":"Create a blacklist\n","requestBody":{"$ref":"#/components/requestBodies/Blacklist"},"responses":{"201":{"description":"Blacklist was created","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Blacklist"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"422":{"$ref":"#/components/responses/InvalidDataError"}},"summary":"Create a blacklist","tags":["Blacklists"],"x-code-samples":[{"lang":"PHP","source":"$blacklistForm = new Rebilly\\Entities\\Blacklist();\n$blacklistForm->setType($blacklistForm::TYPE_EMAIL);\n$blacklistForm->setValue('test@test.com');\n$blacklistForm->setExpiredTime('2025-01-01 05:00:00');\n\ntry {\n $blacklist = $client->blacklists()->create($blacklistForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"}]}},"/blacklists/{id}":{"delete":{"description":"Delete a blacklist with predefined identifier string\n","responses":{"204":{"description":"Blacklist was deleted","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Delete a blacklist","tags":["Blacklists"],"x-code-samples":[{"lang":"PHP","source":"$client->blacklists()->delete('blacklistId');\n"}]},"get":{"description":"Retrieve a blacklist with specified identifier string\n","responses":{"200":{"description":"Blacklist was retrieved successfully","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Blacklist"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Retrieve a blacklist","tags":["Blacklists"],"x-code-samples":[{"lang":"PHP","source":"$blacklist = $client->blacklists()->load('blacklistId');\n"}]},"parameters":[{"$ref":"#/components/parameters/resourceId"}],"put":{"description":"Create a blacklist with predefined identifier string\n","requestBody":{"$ref":"#/components/requestBodies/Blacklist"},"responses":{"201":{"description":"Blacklist was created","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Blacklist"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"409":{"description":"Blacklist exist and cannot be updated","content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/InvalidDataError"}},"summary":"Create a blacklist with predefined ID","tags":["Blacklists"],"x-code-samples":[{"lang":"PHP","source":"$blacklistForm = new Rebilly\\Entities\\Blacklist();\n$blacklistForm->setType($blacklistForm::TYPE_EMAIL);\n$blacklistForm->setValue('test@test.com');\n$blacklistForm->setExpiredTime('2025-01-01 05:00:00');\n\ntry {\n $blacklist = $client->blacklists()->create($blacklistForm, 'blacklistId');\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"}]}},"/contacts":{"get":{"description":"Retrieve a list of contacts\n","parameters":[{"$ref":"#/components/parameters/collectionLimit"},{"$ref":"#/components/parameters/collectionOffset"}],"responses":{"200":{"description":"A list of Contacts was retrieved successfully","headers":{"Pagination-Limit":{"description":"Items per page limit","schema":{"type":"integer"}},"Pagination-Offset":{"description":"Pagination offset","schema":{"type":"integer"}},"Pagination-Total":{"description":"Total items count","schema":{"type":"integer"}},"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"items":{"$ref":"#/components/schemas/Contact"},"type":"array"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"}},"summary":"Retrieve a list of contacts","tags":["Contacts"],"x-code-samples":[{"lang":"PHP","source":"$contacts = $client->contacts()->search([\n 'filter' => 'firstName:John',\n]);\n"}]},"post":{"description":"Create a contact\n","requestBody":{"$ref":"#/components/requestBodies/Contact"},"responses":{"201":{"description":"Contact was created","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"422":{"$ref":"#/components/responses/InvalidDataError"}},"summary":"Create a contact","tags":["Contacts"],"x-code-samples":[{"lang":"PHP","source":"$contactForm = new Rebilly\\Entities\\Contact();\n$contactForm->setFirstName('Sherlock');\n$contactForm->setLastName('Holmes');\n$contactForm->setOrganization('TestOrganization');\n$contactForm->setEmails(\n [\n [\n 'label' => 'main',\n 'value' => 'johndoe@testemail.com',\n 'primary' => true,\n ],\n [\n 'label' => 'secondary',\n 'value' => 'otheremail@testemail.com',\n ],\n ]\n);\n$contactForm->setPhoneNumbers(\n [\n [\n 'label' => 'work',\n 'value' => '+123456789',\n 'primary' => true,\n ],\n [\n 'label' => 'home',\n 'value' => '+9874654321',\n ],\n ]\n);\n\ntry {\n $contact = $client->contacts()->create($contactForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"}]}},"/contacts/{id}":{"delete":{"description":"Delete a contact with predefined identifier string\n","responses":{"204":{"description":"Contact was deleted","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"402":{"description":"Contact cannot be deleted"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Delete a contact","tags":["Contacts"]},"get":{"description":"Retrieve a contact with specified identifier string\n","responses":{"200":{"description":"Contact was retrieved successfully","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"}},"summary":"Retrieve a contact","tags":["Contacts"],"x-code-samples":[{"lang":"PHP","source":"$contact = $client->contacts()->load('contactId');\n"}]},"parameters":[{"$ref":"#/components/parameters/resourceId"}],"put":{"description":"Create or update a contact with predefined identifier string\n","requestBody":{"$ref":"#/components/requestBodies/Contact"},"responses":{"201":{"description":"Contact was created","headers":{"Rate-Limit-Limit":{"description":"The number of allowed requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Remaining":{"description":"The number of remaining requests in the current period","schema":{"type":"integer"}},"Rate-Limit-Reset":{"description":"The date in format defined by [RFC 822](https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1)\nwhen the current period will reset\n","schema":{"type":"string"}}},"content":{"application/json; charset=utf-8":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"401":{"$ref":"#/components/responses/AccessForbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"description":"Contact exists and cannot be updated"},"422":{"$ref":"#/components/responses/InvalidDataError"}},"summary":"Create or update a contact with predefined ID","tags":["Contacts"],"x-code-samples":[{"lang":"PHP","source":"$contactForm = new Rebilly\\Entities\\Contact();\n$contactForm->setFirstName('Sherlock');\n$contactForm->setLastName('Holmes');\n$contactForm->setOrganization('TestOrganization');\n$contactForm->setEmails(\n [\n [\n 'label' => 'main',\n 'value' => 'johndoe@testemail.com',\n 'primary' => true,\n ],\n [\n 'label' => 'secondary',\n 'value' => 'otheremail@testemail.com',\n ],\n ]\n);\n$contactForm->setPhoneNumbers(\n [\n [\n 'label' => 'work',\n 'value' => '+123456789',\n 'primary' => true,\n ],\n [\n 'label' => 'home',\n 'value' => '+9874654321',\n ],\n ]\n);\n\ntry {\n $contact = $client->contacts()->update('contactId', $contactForm);\n} catch (UnprocessableEntityException $e) {\n echo $e->getMessage();\n}\n"}]}},"/coupons":{"get":{"description":"Retrieve a list of