{"swagger":"2.0","info":{"version":"3.2.0","title":"Spaycial REST API","x-logo":{"url":"https://www.spaycial.com/hubfs/LOGOSPAYCIAL.svg","altText":"Spaycial"},"description":"# Introduction\nWelcome to the reference for the Spaycial REST API, aka TC4Hubs API!\nWant to share your opinion on how our API works for you? Tell us how you feel about using our API and what we can\n do to make it better: tech@spaycial.com\n\n## Access to the API\n\nYou can access the Spaycial REST API via one of the following endpoints:\n\n| Environment| Base URL for REST Endpoints |\n-------------------------|-------------------------|\n|Production | https://api.transactionconnect.com   |\n|Sandbox    | https://api-test.transactionconnect.com|\n\n\n## Signature\n\n### Sending data to Shopping Hubs API\n\nOn Shopping Hubs API, some requests need to be signed by providing Signature headers (see the section below).\n\nTo be able to sign requests, you should provide dedicated public keys for both the staging and live environment of the API (see \"RSA keys generation instruction\" section). Those keys should be emailed to tech@spaycial.com.\n\nThe private key should be securely stored on your server.\n\nIn case of a possible security breach, the private key should be regenerated and the public key should be emailed again.\n\n#### Signature headers\n\nThe following headers are required for the request to be considered signed:\n* `Expires-at` - request expiration time as a UNIX timestamp in UTC timezone. We suggest using +1 minutes from the current time. The maximum value is 1 hour from now in UTC, otherwise, a ForbiddenRequest with `invalidExpiresAtHeader` code error will be raised;\n* `Signature` - `base64` encoded `SHA256` signature of the string represented in the form `Expires-at|request_method|original_url|post_body|` - 4 parameters concatenated with a vertical bar `|`, signed with the client’s private key.\n\nThe pseudocode to generate the signature looks like this:\n`base64(sha256_signature(private_key, \"Expires-at|request_method|original_url|post_body|\")))`.\n\nThe fields request_method, original_url, and post_body from the Signature header represent:\n* `request_method` - uppercase method of the HTTP request. Example: GET, POST, PATCH, PUT, DELETE, etc.;\n* `original_url` - the full requested URL, with all its complementary parameters;\n* `post_body` - the request post body. Should be left empty if it is a GET request, or the body is empty.\n\nAn example of the string that is to be used to generate the signature looks as follows:\n\n* `GET` string example: `1522249849|GET|https://api.transactionconnect.com/myResource?customerId=123||`\n\n* `POST` string example: `1522249849|POST|https://api.transactionconnect.com/myResource|{\"customerId\":\"123\"}|`\n\n* Headers example:\n```\nExpires-at: 1413466421\nSignature: 0o6LgMnlG7FX5tWLoKd6V5jlktodP8I/3vWqh1pOZvPgMn/WPq5YqZWPc0teey135RO2muFThcvuZJtcbaUje1UWFHyWhTh89guHJ47pgBB7w0LMkRw3XskEsafEUZketeTY/NtyeU7ETHHm2Tlw8IJho+gk51Rtp7JJPanw2OZG/6BElFcL0qGs4ohTmJUKKsdI1eo5jseFqF+sX0T4dRYqL7ebhDCD8YsYdsZ9zxlX88+YtUQnEqGbswOH4saGaQNH9NjxST2NS8MFtCU7uwZGybBk4i0l1wtbTJwfgaa+yb2L7l0ltIgxZFJzQOShpVOgI+o8fUg31lOblmMVkpyvXJ/n5Ed2u0nA1yMWkQUPpu03Xkh2RG7qbBOEq6+A374OnhUDwi5TUqYrY89paPwq/A7z2lc56Q84T+NrSLdi0x0aejpp6Cn90Yqpbs04dIio579+KyLm/8XoZ4p9k7vz6vTpDITyTAc93/KHnqeT1hTp7AWMaxuGfEI361fyZLDzkSvnHq4QzMkJOKhPELxSji99dm0LCSZpUiUhTTU3G09LvLBCEFLvbGJzxlO7NgqOGVPMlEc4fJqzU/jrTfkodn4DtzaOJghlXynithKIUBAkpNY9QGPOQIMvcbOZfhilm+bjWuYeNpeALvbqY3ONcibHLjc8ItAVMzORSFg=\n```\n\n#### RSA keys generation instruction\n1. Install openssl package\n\nMac OS X\nInstall via [Homebrew](http://brew.sh/): brew install openssl\n\nWindows\n[Windows complete package .exe installer](https://www.openssl.org/community/binaries.html)\n\nUbuntu Linux\napt-get install openssl\n\n2. Create the RSA Key Pair\nfor Mac OS X and Ubuntu Linux:\ntype in the command line:\n`openssl genrsa -out private.pem 2048`\n`openssl rsa -pubout -in private.pem -out public.pem`\n\nfor Windows:\nAfter the package has been installed, open a command prompt and navigate to the install path.\nThen you can generate RSA keys by typing:\n`openssl genrsa -out private.pem 2048`\n`openssl rsa -pubout -in private.pem -out public.pem`\n\n3. Send the public key\nThe private key (private.pem) should be securely stored on your server.\nThe public key (public.pem) should be emailed to tech@spaycial.com\n\n### Receiving data from Shopping Hubs API\n\nOn Shopping Hubs API, Spaycial needs to push data to your system to inform you about different events (see the [Webhooks section](#section/Webhooks) for the list of the events).\n\n#### Request format\n\nThere are several common points about the request we send to the push URLs provided:\n* The `Content-Type` header is `application/json`;\n* There are signature headers that identify the request was signed by Shopping Hubs API (see next section);\n* The request method is always `POST`;\n\n#### Signature headers\n\nThe following headers are sent in the request to allow you to verify that the request is coming from Shopping Hubs API:\n* `Expires-at` - request expiration time as a UNIX timestamp in UTC timezone. We suggest to use +1 minute from the current time.\n* `Signature` - `base64` encoded `SHA256` signature of the string represented in the form `Expires-at|push_url|post_body|` - 3 parameters concatenated with a vertical bar `|`, signed with the Shopping Hubs APIS’s private key.\n\nThe pseudocode to generate the signature looks like this:\n`base64(sha256_signature(private_key, \"Expires-at|push_url|post_body|\")))`.\n\nThe fields `push_url`, and `post_body` from the Signature header represent:\n* `push_url` - the full URL where data is pushed;\n* `post_body` - the request post body.\n\nYou should use the following public key to verify the signature:\n\n* in Sandbox:\n\n```jsx\n-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwfc/T2Pv+ua5pUBqtVdK\n+mtl7dphlPuI3jtYifTCEIhahNN8ZFtJwcYeuKwZxcFowO2zL/YQ4468Jj9jdKgb\nA4JBOyWELHRawt9opTGuHEzyrl4VHG27bKrFYfOJwsyMEUjKSCxeRr173qkhIolr\nMWnqgCtydBsnFZocghbWknoupl+aAEgesmLteHFNvfoQAeoJJLOvpA2ieQvLiTWE\nh+oaSPuLN+ftRgUIY6DrAOOQFBtMtcVY2p6ZR27R1TgHr2YMWKxB/DUNVmaUsW/t\nMVf+QOkmPLwKOrz/HjyZNLqh+vhmrsrc97dyImmnd1yjuciFtNzMwCmTO8lQ94uk\nFwIDAQAB\n-----END PUBLIC KEY-----\n```\n\n* in Production:\n\n```jsx\n-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAvXYksIu868s8b+KPwisC\nUjEozQQTpQeQzaIqhDFB32htYPQJSjmZ8zoKHcInbmrunglRgtqxB5c0KxzjdUjZ\n9U3hXk7MsJPKxcpFyWll8frDuMhvxK9Ly+OGqLdQSwQjjkf65fsKSyuKCUM5ww7S\nV3mH4uili4p9+61ctGbtYQiqUJls8No/YAZBjSpgm7KZFK7ILYaFb03KeHxF4qv1\n7Wdk002hH2UCZ62faLA9mX34safBNzC5fjAc7VXKRt+3TSzPcjLrHnbYnDzH3Diu\nq5sHDtuiwVvGonzDe2wKWgAAnugSAGFyPHsfX36cGq1KwA4ivwVX2lDsl5uOLkkU\nKwIDAQAB\n-----END PUBLIC KEY-----\n```\n\nAn example of the string that is to be used to generate the signature looks as follows:\n* `POST` string example:\n`1522249849|https://www.api.yourdomain.com/customer_subscription|\"{\"event\": \"customer_subscription\", \"customerExternalId: \"123456\", \"status\": \"creation\", \"customerId\": \"c84c33cf-62c6-4a44-8692-973cc0cc420c\", \"credentialsPreviouslyUsed\": false,\"registrationDate\": \"2020-07-13T11:34:41+01:00\", \"dataProviderType\": \"bank\",\"shoppingHubId\": \"f24b4d97-8d70-4133-b685-732c69b87884\",\"shoppingHubExternalId\": \"3142\"}\"|`\n\n* Headers example:\n\n```jsx\n{\n    \"Expires-at\": \"1522249849\",\n    \"Signature\": \"0o7LgMnlG7FX5tWLoKd6V5jlktodP8I/3vWqh1pOZvPgMn/WPq5YqZWPc0teey135RO2muFThcvuZJtcbaUje1UWFHyWhTh89guHJ47pgBB7w0LMkRw3XskEsafEUZketeTY/NtyeU7ETHHm2Tlw8IJho+gk51Rtp7JJPanw2OZG/6BElFcL0qGs4ohTmJUKKsdI1eo5jseFqF+sX0T4dRYqL7ebhDCD8YsYdsZ9zxlX88+YtUQnEqGbswOH4saGaQNH9NjxST2NS8MFtCU7uwZGybBk4i0l1wtbTJwfgaa+yb2L7l0ltIgxZFJzQOShpVOgI+o8fUg31lOblmMVkpyvXJ/n5Ed2u0nA1yMWkQUPpu03Xkh2RG7qbBOEq6+A374OnhUDwi5TUqYrY89paPwq/A7z2lc56Q84T+NrSLdi0x0aejpp6Cn90Yqpbs04dIio579+KyLm/8XoZ4p9k7vz6vTpDITyTAc93/KHnqeT1hTp7AWMaxuGfEI361fyZLDzkSvnHq4QzMkJOKhPELxSji99dm0LCSZpUiUhTTU3G09LvLBCEFLvbGJzxlO7NgqOGVPMlEc4fJqzU/jrTfkodn4DtzaOJghlXynithKIUBAkpNY8QGPOQIMvcbOZfhilm+bjWuYeNpeALvbqY3ONcibHLjc8ItAVMzORSFg=\",\n    \"Content-Type\": \"application/json\",\n    \"Accept\": \"application/json\"\n}\n```\n\n## Creating a validation end-point to verify your user's external access token\n\nWhen you integrate our solution, we request that you create and communicate to us a new access token validation end-point.\n\nThe aim of this end-point is for us to be able to validate the access token of a given customer in your repository (external token), when you request us to generate a new access token for this customer (see the [auth getAccessToken section](#operation/getAccessToken)).\n\nWe will send you the customer external token we have received in your request for you to check if it matches the one you would have sent us.\n\n### How does it work?\n\nWhen you send a request to get an access token for a given customer id or customer external id (see the [auth getAccessToken section](#operation/getAccessToken)), before generating the customer's access token, we need to validate the customer's external token.\n\nIn order to proceed with this verification, we will send a `GET` request to the end-point you provided with the following headers parameters:\n\n* `Expires-at` - request expiration time as a UNIX timestamp in UTC timezone. We use +1 minute from the current time.\n* `Signature` - `base64` encoded `SHA256` signature of the string represented in the form `x-access-token|Api-Key|Expires-at|` - 3 parameters concatenated with a vertical bar `|`, signed with the Spaycial’s private key.\n* `Content-Type` - `application/json`.\n* `Accept` - `application/json`.\n* `x-access-token` - the customer access token in your repository.\n* `Api-Key` - API key to use Spaycial API.\n* `customerExternalId` - the customer external id.\n\nIf the customer's external token is validated (meaning we get a successful response from your end-point), we will generate a new access token for this customer. Otherwise, we will return an error.\n\n### Examples\n\n#### Validation end-point to be provided to us\n\n`https://www.api.yourdomain.com/mymall/tc-endpoint`\n\n#### Headers to be received by your end-point\n\n```jsx\n{\n    ...\n    “expires-at”: “1623406378\",\n    “signature”: “iv2MYg/u94gKX1qgSS2+m0KJwYGUNAiMh4kXs2KzrtczdrCiby4nj8+b/Lmk5VP/BKkU71VKE0vyiskjif6XFzlhgTun4IIPCHBmVMmfzWt4U19h01Zs18YVxqDX3fGMj6sdOLES7qarMMxdcD1fS8MilFOZTeBj/eoLpArHL3cAHQ/snu2yidGG+3A3JX77Rrp947ZR+joO5cDFn6qTkSeaxDof2oWNJLDR8dzM8OystbDOhSU2HIe4BokC5mBYreT2lKTH5KOpw9Nz4LP9yaHHwnyo/X0PA9l6u7ZyknnQtlTFh9wIQyOIgDJsPiuvW3z6xfvwj9JsWrOsMxcwWQ==“,\n    “content-type”: “application/json”,\n    “accept”: “application/json”,\n    “x-access-token”: “123456789\",\n    “api-key”: “17fe12345cc783a16b2070b1eaa382dki”\n}\n```\n# Sequence Diagrams\n\nHere are some sequence diagrams simplified for helping the implementation. Hyperlinks to the documentation of mentioned APIs are provided where possible,\nmake sure to read the associated doc.\n\n## User Subscription Flow\n\nIn this diagram you have a general overview of the user subscription flow.\n\n<object data=\"https://cdn.transactionconnect.com/doc/sequencediagrams/1_User_subscription_flow.pdf\" type=\"application/pdf\" width=\"100%\" height=\"700px\">\n    <embed src=\"https://cdn.transactionconnect.com/doc/sequencediagrams/1_User_subscription_flow.pdf\">\n        <p>This browser does not support PDFs. Please download the PDF to view it: <a href=\"https://cdn.transactionconnect.com/doc/sequencediagrams/1_User_subscription_flow.pdf\">Download User Subscription Flow PDF</a>.</p>\n    </embed>\n</object>\n\n## Authenticated Action Flow\n\nOnce a customer is subscribed he can access different views to visualize his data and perform some actions (you can take a look to the [Web Ui Integration]\n(#section/Web-UI-integration)). To do this you have to first fetch a valid Spaycial JWT token and have exposed the [validation endpoint]\n\n(#section/Introduction/Creating-a-validation-end-point-to-verify-your-user's-external-access-token)\n<object data=\"https://cdn.transactionconnect.com/doc/sequencediagrams/2_Authenticated_Action_Flow.pdf\" type=\"application/pdf\" width=\"100%\" height=\"700px\">\n    <embed src=\"https://cdn.transactionconnect.com/doc/sequencediagrams/2_Authenticated_Action_Flow.pdf\">\n        <p>This browser does not support PDFs. Please download the PDF to view it: <a href=\"2_Authenticated_Action_Flow.pdf\">Download Authenticated Action Flow PDF</a>.</p>\n    </embed>\n</object>\n\n## Webhooks lifecycle\n\nTo receive data from our servers in real time you can use webhooks that you can set up autonomously via the [webhook API](#operation/postWebhook)\n\n<object data=\"https://cdn.transactionconnect.com/doc/sequencediagrams/4_Webhooks.pdf\" type=\"application/pdf\" width=\"100%\" height=\"700px\">\n    <embed src=\"https://cdn.transactionconnect.com/doc/sequencediagrams/4_Webhooks.pdf\">\n        <p>This browser does not support PDFs. Please download the PDF to view it: <a href=\"https://cdn.transactionconnect.com/doc/sequencediagrams/4_Webhooks.pdf\">Download Webhooks lifecycle PDF</a>.</p>\n    </embed>\n</object>\n\n## Cashback Flow\n\nHere is an example of the lifecycle of a cashback.\n\n<object data=\"https://cdn.transactionconnect.com/doc/sequencediagrams/3_Cashback_Flow.pdf\" type=\"application/pdf\" width=\"100%\" height=\"700px\">\n    <embed src=\"https://cdn.transactionconnect.com/doc/sequencediagrams/3_Cashback_Flow.pdf\">\n        <p>This browser does not support PDFs. Please download the PDF to view it: <a href=\"https://cdn.transactionconnect.com/doc/sequencediagrams/3_Cashback_Flow.pdf\">Download Cashback Flow PDF</a>.</p>\n    </embed>\n</object>\n\n# Web UI integration\n\nFor the integration with your website or up you can redirect your users to our website for different actions and pass a callback url to redirect the user to your site at the end of the action\n\n**technical information(url access), these fields are available on all following steps:**\n\nyour-loyalty-domain - your domain url that we gave to you\n\nlng - [optional] The language to be shown in a two letters format (ex. 'fr') the language of your shopping hub is always available, list of languages code https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes?oldid=133943906\n\n## Onboarding your user to the program\n\nThe user can be redirected to different interfaces depending on the active features on the shopping hub(the url entry point doesn't change).*\n\nif receipt scan is enabled + bank connection is activated, the user is redirected to a registration choice (manual(scan) / auto(account linking))*\n\nif the scan is not activated, the user is directly redirected to the bank selection.*\n\nOnce the user is registered, he accesses a success page then is redirected to your own customer area using the callback url initially provided in the url query string (cb=your_callback_url)*\n\n![https://cdn.transactionconnect.com/img/doc/select-type.png](https://cdn.transactionconnect.com/img/doc/select-type.png)\n\n**technical information(url access):**\n\n**Link**:\n<code>https://your-loyalty-domain.com/?mid=[your_mall_id]&cid=[your_customer_id]&cb=[your_callback_url]&lng=[language]&ted=[transactions_eligible_from_date]</code>\n\nmid - your mall id as stored in our database as external\n\ncid - your customer id as stored in our database as external\n\ncb - the url to redirect the user at the end of the onboarding\n\nted - [optional] A unix timestamp (in seconds) in the past to allow eligible transactions before the system registration date\n\n## Make the user add a cashback method\n\nWhen the user does not have a cashback method yet, he/she can add it using the /cashback url.\nOnce the method has been registered, the user can visualize/update it on the Profile interface (see section below)\n\n![https://cdn.transactionconnect.com/img/doc/cashback.png](https://cdn.transactionconnect.com/img/doc/cashback.png)\n\n**Link**\n<code>https://your-loyalty-domain.com/cashback?t=[the_jwt_token_for]&cb=[your_callback_url]&lng=[language]</code>\n\ncb - the url to redirect the user at the end of the onboarding <br />\n\nt - the token of the user <br />\n\n## Make the user visualize/update his cashback method\n\nWhen the user does not have a cashback method, we invite him to enter one of his own using our Profile interface.\nOnce the method has been registered, the user can visualize/update his cashback method*\n\n![https://cdn.transactionconnect.com/img/doc/profil.png](https://cdn.transactionconnect.com/img/doc/profil.png)\n\n![https://cdn.transactionconnect.com/img/doc/addIban.png](https://cdn.transactionconnect.com/img/doc/addIban.png)\n\n**technical information(url access):**\n\n**Link**: <code>https://your-loyalty-domain.com/profile?t=[the_jwt_token_for]&cb=[your_callback_url]&lng=[language]</code>\n\nyour_callback_url - the url to redirect the user at the end of the onboarding\n\n## User activities page (transactions, rewards, scan, claims)\n\nThis area allows the user to visualize the main information relating to his customer account (purchases, claims, rewards and transactions (made in the shopping hub)).*\n\nThe user can also make a claim, add a scan(for scan users) and add a first connection (for scan users)*\n\n![https://cdn.transactionconnect.com/img/doc/activities.png](https://cdn.transactionconnect.com/img/doc/activities.png)\n\n**technical information(url access):**\n\n**Link**: <code>https://your-loyalty-domain.com/activities?t=[the_jwt_token_for]&cb=[your_callback_url]&lng=[language]</code>\n\n## Make the user add a claim\n\nIf a transaction was not taken into account by our system, the user can make a claim by filling out a form within his/her customer area. This form contains information about the purchase, including an attachment to provide the receipt as proof of the purchase. \nThe claim will then be studied by the Spaycial team.\nIf the claim is relevant, it will be validated, you’ll get a “validated” notification via the claim_update webhook, and the purchase will be sent in the next customer_transactions webhook notification.\nIf the claim is not relevant, it will be rejected, and you’ll get a “rejected” notification via the claim_update webhook.\n\n![https://cdn.transactionconnect.com/img/doc/claim_img.png](https://cdn.transactionconnect.com/img/doc/claim_img.png)\n\n**technical information(url access)**\n\n**Link**: <code>https://your-loyalty-domain.com/claims?t=[the_jwt_token_for]&cb=[your_callback_url]</code>\n\nyour_callback_url - the url to redirect the user once the user made the claim\n\n## User connections management page\n\nThis area allows the user to visualize his bank connections linked to the shopping hub's loyalty program*\n\nThe user can also update his banking information, add new connections, delete a connection (you need at least 2 connections to be able to delete one)*\n\n![https://cdn.transactionconnect.com/img/doc/connections.png](https://cdn.transactionconnect.com/img/doc/connections.png)\n\n**technical information(url access):**\n\n**Link**: <code>https://your-loyalty-domain.com/connections?t=[the_jwt_token_for]&cb=[your_callback_url]&lng=[language]</code>\n\n# Webhooks\n\nWhen an event occurs, we send you a webhook notification to tell you what's happened so you can take action and keep your business running smoothly.\n\nWebhooks provide definitive confirmation of a status update and are used for a variety of purposes, such as notifying an onboarding, notifying some new transactions that happened in the hub, and notifying a change in the status of a customer connection.\n\nWhen the event you subscribed to by creating a webhook occurs we will POST the data on the URL you provided in the JSON format indicated here in the webhook events documentation.\n\nYou can authenticate Spaycial as the author of webhook events thanks to a signature system (see the **Receiving data from Shopping Hubs API** part of the [Signature section](#section/Introduction/Signature)).\n\nTo create a webhook use the POST /webhook API. You can then manage it with the PATCH and DELETE API.\n\nWhen the system makes a  POST call to your webhook subscription it will check the response and schedule a retry if the response has an error code. For example:\nif your server returns a 500 response status the post will be retried until the response is 200. The systems will try a maximum of 6 times including the first call and after that, it will retry following this schedule: 10 minutes, 1 hour, 24 hours, 48 hours, and 72 hours.\n\nAfter the 6th attempt, the system will stop retrying and data will be lost.\n\nThe POST call from the webhook includes an HTTP header named \"AttemptNumber\" which starts from 0 and identifies the retries made before this call.\n\nLastly, you can test some of those webhooks using a POST call on /admin/webhook/[camelCaseWebhookName], see below for more information.\n\n\n## customer_creation\n\nThis event is triggered when a customer is created in the Spaycial system. It means the customer has started a registration process.\n\nParameters in the body:\n\n**event** [String]: the name of the webhook event, here \"customer_creation\"\n\n**customerExternalId** [String]: the customer external identifier (identifier of the customer in the client repository)\n\n**customerId** [String]: Spaycial customer id\n\n**shoppingHubId** [String]: Shopping Hub id\n\n**shoppingHubExternalId** [String]: Shopping Hub External Id\n\nExample:\n\n```jsx\n{\n\t\"event\": \"customer_creation\",\n\t\"customerExternalId: \"4354213424\",\n\t\"customerId\": \"b84c33cf-62c6-4a44-8692-973cc0cc420c\",\n\t\"shoppingHubId\": \"f24b4d97-8d70-4133-b685-932c69b87114\",\n\t\"shoppingHubExternalId\": \"341451\",\n}\n```\n\n## customer_subscription\n\nThis event is triggered when a change occurs on a customer subscription.\n\nParameters in the body:\n\n**event** [String]: the name of the webhook event\n\n**customerExternalId** [String]: the customer external id assigned by the client\n\n**status** [String]**:** The new status of the customer subscription. The possible values are: 'creation', 'deletion', 'update'. 'creation' means the customer has completed the registration process by linkin his/her payment method. 'deletion' means the customer has been deleted from our system. 'update' means the customer has linked a new payment method to our system.  \n\n**customerId** [String]: Spaycial customer id\n\n**credentialsPreviouslyUsed** [Boolean]: bank credentials already used for this customer\n\n**registrationDate** [String]**:** Customer's registration date in the system (in ISO 8601 format)\n\n**transactionsEligibleFromDate** [String]**:** Start date from where transactions will be pushed\n\n**dataProviderType** [String]**:** Provider type of subscription, possible values: 'bank', 'restaurant', 'scan' (not required)\n\n**shoppingHubId** [String]: Shopping Hub id\n\n**shoppingHubExternalId** [String]: Shopping Hub External Id\n\nExample:\n\n```jsx\n{\n\t\"event\": \"customer_subscription\",\n\t\"customerExternalId: \"43213424\",\n\t\"status\": \"creation\"\n\t\"customerId\": \"c84c33cf-62c6-4a44-8692-973cc0cc420c\",\n\t\"credentialsPreviouslyUsed\": false,\n\t\"registrationDate\": \"2020-07-13T11:34:41+01:00\",\n\t\"transactionsEligibleFromDate\": \"2020-07-13T11:34:41+01:00\",\n\t\"dataProviderType\": \"bank\",\n\t\"shoppingHubId\": \"f24b4d97-8d70-4133-b685-732c69b87884\",\n\t\"shoppingHubExternalId\": \"654564561\",\n}\n```\n\n## customer_transactions\n\nThis event is triggered when new transactions are detected inside the program. This webhook pushes more transactions at the time in an **array**. This webhook is specific to mall programs (hub_type='mall').\n\nParameters in the array in the body:\n\n**event** [String]: the name of the webhook event\n\n**transactions:** [Array]\n\n**id** [uuid]: the id of the transaction\n\n**amount** [Float]: the amount of the transaction\n\n**purchaseDate** [String]: the date of the transaction\n\n**dateBankingStatement** [String]: the date of the banking statement, null for non bank transactions or if not provided by the bank\n\n**customerId** [String]: Spaycial's customer id\n\n**customerExternalId** [String]: The client's customer id\n\n**purchaseLocation:** [Object]\n\n**id:** The Spaycial's id of the purchase location\n\n**externalId:** The external id of the purchase location\n\n**type:** The purchase location type 'service' or 'store'\n\n**dataProviderType** [String]**:** The origin of the transaction: 'bank' for an open banking transaction, 'restaurant' for restaurant card providers, 'scan' for receipt scan, 'support'\n\n**currency** [String]: the currency of the transaction in three letters format ex.'EUR'\n\n**timeOfPurchase** [String]**:** the date and time of the transaction (only provided when dataProviderType='scan', meaning for transactions coming from receipt's scan feature)\n\n**receiptId** [String]: the receipt id linked to this transaction\n\n**shoppingHubId** [String]: Shopping Hub id\n\n**shoppingHubExternalId** [String]: Shopping Hub External Id\n\nExample:\n\n```jsx\n{\n\t\"event\": \"customer_transactions\",\n\t\"transactions\": [\n\t\t{\n\t\t\t\"id\": \"c84c33cf-62c6-4a44-8692-973cc0cc420c\",\n\t\t\t\"amount\": -10.53,\n\t\t\t\"currency\": \"EUR\",\n\t\t\t\"purchaseDate\": \"2023-01-12\",\n\t\t\t\"dateBankingStatement\": \"2023-01-15\",\n\t\t\t\"customerId\": \"8148b7f5-fcd4-4818-aefa-5450e7dd5dad\",\n\t\t\t\"customerExternalId\": \"87316292\",\n\t\t\t\"purchaseLocation\": {\n\t\t\t\t\"id\": \"6a6a578b-662b-4673-8885-e00902a34dd4\",\n\t\t\t\t\"externalId\": \"18289377\",\n\t\t\t\t\"type\": \"store\"\n\t\t\t},\n\t\t\t\"dataProviderType\": \"bank\",\n\t\t\t\"receiptId\": null,\n\t\t\t\"timeOfPurchase\": null\n\t\t},\n\t\t{\n\t\t\t\"id\": \"e1f5316f-877a-4ea3-92ce-63b99c8a5aae\",\n\t\t\t\"amount\": -24.17,\n\t\t\t\"currency\": \"EUR\",\n\t\t\t\"purchaseDate\": \"2023-01-15\",\n\t\t\t\"dateBankingStatement\": null,\n\t\t\t\"customerId\": \"8148b7f5-fcd4-4818-aefa-5450e7dd5dad\",\n\t\t\t\"customerExternalId\": \"87316292\",\n\t\t\t\"purchaseLocation\": {\n\t\t\t\t\"id\": \"f4de5a19-5a36-4227-a2ac-a543a1902964\",\n\t\t\t\t\"externalId\": \"18289514\",\n\t\t\t\t\"type\": \"store\"\n\t\t\t},\n\t\t\t\"dataProviderType\": \"scan\",\n\t\t\t\"receiptId\": \"9bb59173-5510-4b11-a783-71c83c3b6564\",\n\t\t\t\"timeOfPurchase\": \"2023-01-15 13:09:00.000000 +00:00\"\n\t\t}\n\t],\n  \"shoppingHubId\": \"f24b4d97-8d70-4133-b685-732c69b87884\",\n  \"shoppingHubExternalId\": \"654564561\"\n}\n```\n\n## all_transactions\n\nThis event is triggered for non-mall programs when transactions have been studided by the Spaycial enrichment pipeline. This webhook pushes all transactions belonging to customers of the program in an array. It uses the same retry mechanism as all our webhooks (see dedicated section describing the general behavior of our webhooks).\n\nParameters in the array in the body:\n\n**event** [String]: the name of the webhook event\n\n**transactions:** [Array]\n\n    **id** [uuid]: the id of the transaction\n\n    **rawData** [Object]: Raw data (as transmitted by the bank)\n\n        **amount** [Float]: the amount of the transaction\n\n        **label** [String]: the raw transaction label from the bank\n\n        **bankingStatementDate** [String]: the date of the banking statement, null for receipt transactions or if not provided by the bank\n\n        **currency** [String]: the currency of the transaction in three letters format ex.'EUR'\n\n        **transactionType** [String]: the type of transaction (nullable)\n\n    **spaycialData** [Object]: Object containing Spaycial-specific information\n\n        **customerId** [String]: Spaycial's customer id\n\n        **customerExternalId** [String]: The client's customer id\n\n        **bankAccountId** [String] (nullable): Spaycial's bank account id linked to this transaction. Cross-reference with accounts[].accountHash from bank_connections_update_v2 to identify joint accounts and deduplicate. Null for receipt transactions.\n\n        **receiptId** [String]: the receipt id linked to this transaction (if suitable)\n\n        **shoppingHubId** [String]: Shopping Hub id (program id in the Spaycial repository)\n\n        **shoppingHubExternalId** [String]: Shopping Hub External Id (program id in the client repository)\n\n        **enrichment** [Object]: Object containing enriched data\n\n            **purchaseDate** [String]: the date of the transaction\n\n            **merchant** [Object] (null if not found by Spaycial):\n\n                **id:** The Spaycial's id of the merchant\n\n                **name:** The name of the merchant (nullable)\n\n                **type:** The Google type of the merchant (nullable)\n\n            **purchaseLocation** [Object] (null if not found by Spaycial):\n\n                **country:** ISO code of the purchase location country (ex: 'PL' for Poland)\n\n                **city:** name of the city where the purchase was made (ex: 'Wroclaw')\n\n                **pointOfSale** [Object] (null if not found by Spaycial):\n\n                    **id:** The Spaycial's id of the point of sale\n\n                    **externalId:** The external id of the point of sale\n\n                    **googlePlaceId:** Google place_id\n\n                    **longitude:** Longitude coordinate\n\n                    **latitude:** Latitude coordinate\n\n                    **name:** The name of the point of sale (nullable)\n\n                    **address:** The formatted address of the point of sale (nullable)\n\n            **timeOfPurchase** [String]: the date and time of the transaction (nullable)\n\nExample:\n\n```jsx\n{\n\t\"event\": \"all_transactions\",\n\t\"transactions\": [\n\t\t{\n\t\t\t\"id\": \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n\t\t\t\"rawData\": {\n\t\t\t\t\"amount\": 25.50,\n\t\t\t\t\"label\": \"ALDI MADRID\",\n\t\t\t\t\"bankingStatementDate\": \"2025-11-05\",\n\t\t\t\t\"currency\": \"EUR\",\n\t\t\t\t\"transactionType\": \"shopping\"\n\t\t\t},\n\t\t\t\"spaycialData\": {\n\t\t\t\t\"customerId\": \"1381fda2-9acb-4d1e-bdf5-29a80f54bb33\",\n\t\t\t\t\"customerExternalId\": \"84\",\n\t\t\t\t\"bankAccountId\": \"a1b2c3d4-e5f6-7890-abcd-000000000002\",\n\t\t\t\t\"receiptId\": null,\n\t\t\t\t\"shoppingHubId\": \"c4bde2eb-f77d-41a9-9ce5-a78f35abd659\",\n\t\t\t\t\"shoppingHubExternalId\": \"sil\",\n\t\t\t\t\"enrichment\": {\n\t\t\t\t\t\"purchaseDate\": \"2025-11-05\",\n\t\t\t\t\t\"merchant\": {\n\t\t\t\t\t\t\"id\": \"e1a0d3ca-d15b-467d-9fdb-e34cc7b2240c\",\n\t\t\t\t\t\t\"name\": \"ALDI \",\n\t\t\t\t\t\t\"type\": null\n\t\t\t\t\t},\n\t\t\t\t\t\"purchaseLocation\": {\n\t\t\t\t\t\t\"country\": \"ES\",\n\t\t\t\t\t\t\"city\": \"Madrid\",\n\t\t\t\t\t\t\"pointOfSale\": {\n\t\t\t\t\t\t\t\"id\": \"e1a0d3ca-d15b-467d-9fdb-e34cc7b2240d\",\n\t\t\t\t\t\t\t\"externalId\": \"17\",\n\t\t\t\t\t\t\t\"googlePlaceId\": \"ChIJA5_uK0kpQg0RTo_iggAgVvo\",\n\t\t\t\t\t\t\t\"longitude\": -3.703528,\n\t\t\t\t\t\t\t\"latitude\": 40.447365,\n\t\t\t\t\t\t\t\"name\": \"ALDI\",\n\t\t\t\t\t\t\t\"address\": \"Gta. de Cuatro Caminos, 6, Tetuán, 28020 Madrid, Espagne\"\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t\"timeOfPurchase\": null\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t]\n}\n```\n\n## receipt_updated\n\nThis event is triggered when a receipt status is updated\n\nParameters in the body:\n\n**event** [String]: the name of the webhook event\n\n**receiptId** [Uuid]: the id of the receipt ticket\n\n**status**  [String]: the status that has been updated possible values: 'pending', 'validated', 'rejected'\n\n**customerId** [String]: Spaycial's customer id\n\n**customerExternalId** [String]: the customer external identifier (identifier of the customer in the client repository)\n\n**shoppingHubId** [String]: Shopping Hub id\n\n**shoppingHubExternalId** [String]: Shopping Hub External Id\n\n**rejectionReason** [String]: the rejection reason has possible values: 'beforeRegistration', 'duplicate', 'incomplete', 'notATicket', 'outOfMall', 'notInClientReferential', 'unknown', null\n\nExample:\n\n```jsx\n{\n\t\"event\": \"receipt_updated\",\n\t\"receiptId\": \"d7d4bad0-f7c0-4427-9305-fa5c9394e211\",\n\t\"status\": \"rejected\",\n\t\"customerId\": \"c84c33cf-62c6-4a44-8692-973cc0cc420c\",\n    \"customerExternalId\": \"87316292\",\n\t\"shoppingHubId\": \"f24b4d97-8d70-4133-b685-732c69b87884\",\n\t\"shoppingHubExternalId\": \"654564561\",\n\t\"rejectionReason\": \"incomplete\"\n}\n```\n\n## cashback_method_updated\n\nThis event is triggered when a cashback method (ex. IBAN) is updated. When the customer IBAN is missing for example, we'll trigger this event with status 'missing' and later when the customer adds a valid IBAN we'll trigger this event with status 'retrieved'\n\nParameters in the body:\n\n**event** [String]**:** the name of the webhook event\n\n**customerId** [String]: Spaycial's customer id\n\n**customerExternalId** [String]: The client's customer id\n\n**status** [String]**:** the status that has been updated possible values: 'missing', 'retrieved'\n\n**shoppingHubId** [String]: Shopping Hub id\n\n**shoppingHubExternalId** [String]: Shopping Hub External Id\n\nExample:\n\n```jsx\n{\n\t\"event\": \"cahsback_method_updated\",\n\t\"customerId\": \"c84c33cf-62c6-4a44-8692-973cc0cc420c\",\n\t\"customerExternalId\": \"87316292\",\n\t\"status\": \"missing\",\n\t\"shoppingHubId\": \"f24b4d97-8d70-4133-b685-732c69b87884\",\n\t\"shoppingHubExternalId\": \"654564561\",\n}\n```\n\n## bank_connections_update\n\nThis event is triggered when the data provider failed to fetch data from the bank account or when the provider connection is resolved\n\nParameters in the body:\n\n**event** [String]: the name of the webhook event\n\n**customer:** [Object]\n\n**id** [String]: Spaycial's customer id\n\n**externalId** [String]: The client's customer id\n\n**connectionsOn** [Number]: The number of customer's active bank connections\n\n**connectionsOff** [Number]: The number of customer's bank connections in error, described in connectionsInError\n\n**connectionsInError:** [Array]\n\n**id** [String]: the bank connection id\n\n**errorCode** [String]: the error code from the data provider\n\n**errorMessage** [String]: the error message from the data provider\n\n**bank** [String]: the bank name of the bank connection\n\n**shoppingHubId** [String]: Shopping Hub id\n\n**shoppingHubExternalId** [String]: Shopping Hub External Id\n\n```jsx\n{\n\t\"event\": \"bank_connections_update\",\n  \"customer\": {\n    \"id\": \"398f0b39-c205-4fb2-a225-70e042df3fdb\",\n    \"externalId\": \"4564564564654\",\n    \"connectionsOn\": 0,\n    \"connectionsOff\": 1\n  },\n  \"connectionsInError\": [\n    {\n      \"id\": \"fea86a6e-48e4-4b20-b07a-3e957f012fb6\",\n      \"errorCode\": \"invalidCredentials\",\n      \"errorMessage\": \"Invalid User\",\n      \"bank\": \"Boursorama\"\n    }\n  ],\n\t\"shoppingHubId\": \"f24b4d97-8d70-4133-b685-732c69b87884\",\n\t\"shoppingHubExternalId\": \"654564561\",\n}\n```\n\n## bank_connections_update_v2\n\nThe bank_connections_update_v2 event is triggered when the bank connection:\n- is created\n- is desynchronised\n- is resynchronised\n- is deleted or disabled\n\n**Event order for new connections:** A `create` event is sent when the connection is created; at that time bank accounts may not yet exist, so `connection.accounts` is often empty. When bank accounts are then created or updated for that connection, an `update` event is sent with `accounts` populated. Consumers should expect: **create** (possibly empty `accounts`) → **update** (with `accounts`).\n\n**Parameters in the body:**\n\n`event` [String]: the name of the webhook event\n\n`eventType` [String]: type of event between create, update or delete\n\n`customer:` [Object]\n\n- `id` [String]: Spaycial's customer id\n\n- `externalId` [String]: The client's customer id\n\n- `connectionsOn` [Number]: The number of customer's active bank connections\n\n- `connectionsOff` [Number]: The number of customer's bank connections in error\n\n- `connections`: [Array] The list of all connections of the customer\n\n`connection` [Object] The connection triggering the event\n\n`shoppingHubId` [String]: Shopping Hub id\n\n`shoppingHubExternalId` [String]: Shopping Hub External Id\n\n**Connection object:**\n\n- `id` [String]: the bank connection id\n\n- `errorCode` [String]: the error code from the data provider\n\n- `errorMessage` [String]: the error message from the data provider\n\n- `bank` [String]: the bank name of the bank connection\n\n- `transactionsEligibleFromDate` [String]: start date for eligibility of transactions on this connection\n\n- `consentExpiresAt` [String]: end of consent for this connection [optional]\n\n- `accounts` [Array]: the list of bank accounts linked to this connection. On eventType \"create\" this is often empty; an \"update\" event is sent when accounts are available.\n\n**Account object:**\n\n- `id` [String]: the Spaycial bank account id\n\n- `accountHash` [String] (nullable): opaque hash of the account IBAN. Accounts sharing the same hash belong to the same real bank account (e.g. joint accounts). Use this together with `bankAccountId` in the `all_transactions` webhook to deduplicate transactions from joint accounts.\n\n```jsx\n{\n  \"event\": \"bank_connections_update_v2\",\n  \"eventType\": \"update\",\n  \"customer\": {\n    \"id\": \"398f0b39-c205-4fb2-a225-70e042df3fdb\",\n    \"externalId\": \"4564564564654\",\n    \"connectionsOn\": 2,\n    \"connectionsOff\": 1,\n    \"connections\": [\n      {\n        \"id\": \"fea86a6e-48e4-4b20-b07a-3e957f012fb6\",\n        \"errorCode\": \"invalidCredentials\",\n        \"errorMessage\": \"Invalid User\",\n        \"bank\": \"Boursorama\",\n        \"transactionsEligibleFromDate\": \"2021-01-03\",\n        \"consentExpiresAt\": \"2021-04-15 01:02:03.0004\",\n        \"accounts\": [\n          {\n            \"id\": \"a1b2c3d4-0001-0001-0001-000000000001\",\n            \"accountHash\": \"abc123hash\"\n          }\n        ]\n      }\n    ]\n  },\n  \"connection\": {\n    \"id\": \"7f41325e-dbe9-4ea6-8406-a2d45ac694ef\",\n    \"errorCode\": null,\n    \"errorMessage\": null,\n    \"bank\": \"BNP\",\n    \"transactionsEligibleFromDate\": \"2021-01-02\",\n    \"consentExpiresAt\": \"2021-05-01 01:02:03.0004\",\n    \"accounts\": [\n      {\n        \"id\": \"a1b2c3d4-0001-0001-0001-000000000002\",\n        \"accountHash\": \"def456hash\"\n      },\n      {\n        \"id\": \"a1b2c3d4-0001-0001-0001-000000000003\",\n        \"accountHash\": \"abc123hash\"\n      }\n    ]\n  },\n  \"shoppingHubId\": \"f24b4d97-8d70-4133-b685-732c69b87884\",\n  \"shoppingHubExternalId\": \"654564561\"\n}\n```\n## bank_association_notification\n\nThe bank_association_notification is triggered when a bank has been removed or added to a program.\n\n**Parameters in the body**\n- `event` [String]: Name of the webhook event described (bank_status_update)\n- `eventType` [String]: Type of the event can be INSERT or DELETE\n- `bank` [Object]: The bank triggering the event\n\n**Bank object:**\n\n- `id` [String]: bank id stored in the Spaycial repository\n\n- `name` [String]: name of the bank\n\n- `active` [Boolean] Status active to true or false. True means that the end-user can register through this bank. False means that the bank will not be clickable by the end-user\n\n- `shoppingHubExternalId` [String] Id used by the program\n\n- `shoppingHubId` [String] ID of the program in the Spaycial repository\n\n```jsx\n{\n  \"event\": \"bank_association_notification\",\n  \"eventType\": \"DELETE\",\n  \"shoppingHubExternalId\": \"3145\",\n  \"shoppingHubId\": \"492f0b39-c205-4fb2-a225-70e042df3fdb\",\n  \"bank\": {\n    \"id\": \"398f0b39-c205-4fb2-a225-70e042df3fdb\",\n    \"name\": \"Société Générale\",\n    \"active\": true,\n  }\n}\n```\n\n## bank_status_update\n\nThe bank_status_update event is triggered when a bank becomes active or inactive.\nAn active bank means the bank is working properly and the user can connect to it. An inactive bank means that the bank is not working properly. It's still displayed in the bank list but it cannot be selected.\n\n**Parameters in the body:**\n\n- `event` [String]: Name of the webhook event described (bank_status_update)\n- `bank` [Object]: The bank triggering the event\n\n**Bank object:**\n\n- `id` [String]: bank id stored in the Spaycial repository\n\n- `name` [String]: name of the bank\n\n- `active` [Boolean] Status active to true or false\n\n- `shoppingHubExternalId` [String] Id used by the program\n\n- `shoppingHubId` [String] ID of the program in the Spaycial repository\n\n```jsx\n{\n  \"event\": \"bank_status_update\",\n  \"shoppingHubExternalId\": \"3145\",\n  \"shoppingHubId\": \"492f0b39-c205-4fb2-a225-70e042df3fdb\",\n  \"bank\": {\n    \"id\": \"398f0b39-c205-4fb2-a225-70e042df3fdb\",\n    \"name\": \"Société Générale\",\n    \"active\": true\n  }\n}\n```\n\n## claim_update\n\nThe claim_update event is triggered when the status of a claim has changed. This means that the claim is either:\n- rejected\n- pending\n- validated\n\n**Parameters in the body:**\n`event` [String]: the name of the webhook event (claim_update)\n\n`eventType` [String]: type of event between pending, validated or rejected\n\n`customer:` [Object]\n\n- `id` [String]: Spaycial's customer id\n\n- `externalId` [String]: The client's customer id\n\n`claim:` [Object]\n\n- `id` [String]: the claim identifier\n\n- `amount` [String]: Amount of the claim\n\n- `store` [String]: Name of the store\n\n- `storeId` [String]: ID of the store in the Spaycial repository\n\n- `storeExternalId` [String]: ID of the store in client's repository\n\n- `date` [String]: Date when the claim was posted (in ISO 8601 format)\n\n- `rejectionReason` [String] Rejection reason of the claim if rejected.\n\n- `code` [String] Code used to defined the rejection reason. Possible values:\n      * TRANSACTION_ALREADY_ASSOCIATED\n      * TRANSACTION_NOT_FOUND\n      * AUTO_REJECTED\n      * DUPLICATED\n      * STORE_OUT_OF_PROGRAM\n      * BEFORE_REGISTRATION\n      * RECEIPT_INCOMPLETE\n\n- `status` [String] Status of the claim (rejected|pending|validated)\n\n- `transactionDate` [Date] Date of the transaction, declared by the user (YYYY/MM/DD)\n\n- `transactionId` [String] ID of the transaction (provided only for validated claims)\n\n```jsx\n{\n  event: \"claim_update\",\n  eventType: \"rejected\",\n  customer: {\n    id: \"398f0b39-c205-4fb2-a225-70e042df3fdb\",\n    externalId: \"4564564564654\",\n  },\n  claim: {\n    id: \"b73dbe2b-b1d6-46f0-8e0c-3ff122de3c62\",\n    amount: \"-12.00\",\n    store: \"ARMAND THIERY\",\n    storeId: \"85536c27-ba78-4c00-ab66-f7c4a7d04faf\",\n    storeExternalId: \"29894111110\",\n    status: \"rejected\",\n    rejectionReason: \"The store is out of program\",\n    code: \"STORE_OUT_OF_PROGRAM\",\n    date: \"2021-10-08T06:50:40.479Z\",\n    transactionId: null,\n    transactionDate: \"2021-10-01\",\n  }\n}\n```\n\n## cashbacks_updated\n\nThis event is triggered when a cashback request is updated. A cashback can have different statutes (two intermediate statuses and two final statuses):\n\nIntermediate statuses:\n\n'SUCCEEDED': the cashback request has been successfully accepted from the cashback provider partner\n\n'FAILED': the cashback provider partner has refused the cashback request\n\nFinal statuses:\n\n'RECEIVED': the customer has received the cashback\n\n'REJECTED': the cashback request has been rejected\n\nParameters in the array in the body:\n\n**event** [String]: the name of the webhook event\n\n**cashbacks:** [Array]\n\n**status** [String]: the status of the cashback. possible values: 'SUCCEEDED', 'FAILED', 'RECEIVED', 'REJECTED'\n\n**transferId** [String]: the transfer id of the cashback\n\n**externalId** [String]: the cashback external id (an optional reference of the cashback in your system)\n\n**customerId** [String]: the customer id in the Spaycial system\n\n**customerExternalId** [String]: the customer id in your system\n\n**shoppingHubId** [String]: Shopping Hub id\n\n**shoppingHubExternalId** [String]: Shopping Hub External Id\n\nExample:\n\n```jsx\n{\n\t\"event\": \"cashbacks_updated\",\n\t\"cashbacks\":\n\t[\n\t\t{\n\t\t\t\"status\": \"RECEIVED\"\n\t\t\t\"transferId\": \"8494514\",\n\t\t\t\"externalId\": \"AEF874113C\",\n\t\t}\n\t],\n    \"customerId\": \"c84c33cf-62c6-4a44-8692-973cc0cc420c\",\n    \"customerExternalId\": \"87316292\",\n\t\"shoppingHubId\": \"f24b4d97-8d70-4133-b685-732c69b87884\",\n\t\"shoppingHubExternalId\": \"654564561\"\n}\n```\n\n## store_list_updated\n\nThis event is triggered after calling POST /shoppingHub/stores and notifies if the store integration was succeeded or failed.\n\nNB: Currently, only one request could be treated at a time per program. If you post a new store list before having the notification of the previous integration, then the previous request will automatically be rejected \n\nParameters in the body:\n\n**event** [String]: the name of the webhook event\n\n**requestId** [String]: the identifier of the request received after calling POST /shoppingHub/stores\n\n**result** [String]: result of the integration. possible values: 'success', 'failed'\n\n**resultDetail** [String]: more information regarding the result of the integration.\n\n**shoppingHubId** [String]: Shopping Hub id\n\n**shoppingHubExternalId** [String]: Shopping Hub External Id\n\nExamples:\n\n```jsx\n{\n\t\"event\": \"store_list_updated\",\n\t\"requestId\": \"wp302492039482039482\",\n\t\"result\": \"success\",\n\t\"shoppingHubId\": \"f24b4d97-8d70-4133-b685-732c69b87884\",\n\t\"shoppingHubExternalId\": \"654564561\"\n}\n```\n\n```jsx\n{\n\t\"event\": \"store_list_updated\",\n\t\"requestId\": \"wp302492039482039482\",\n\t\"result\": \"failed\",\n    \"resultDetail\": \"Only one request can be treated at a time, we'll integrate only the most recent\"\n\t\"shoppingHubId\": \"f24b4d97-8d70-4133-b685-732c69b87884\",\n\t\"shoppingHubExternalId\": \"654564561\"\n}\n```\n\n\n## initial_transaction_update\n\nThe initial_transaction_update event is triggered when an update of the status column from the initial_transaction table has been made. This means that the initial transaction is either:\n- created (when first submitted via POST /admin/sendInitialTransaction)\n- validated (when the store is properly setup in our system)\n- rejected (when we cannot setup the store, with a rejection reason)\n\n**Parameters in the body:**\n`event` [String]: the name of the webhook event (initial_transaction_update)\n\n`eventType` [String]: type of event between created, validated or rejected\n\n`customer:` [Object]\n\n- `id` [String]: Spaycial's customer id\n\n- `externalId` [String]: The client's customer id\n\n`initialTransaction:` [Object]\n\n- `id` [String]: the initial transaction identifier\n\n- `amount` [Number]: Amount of the initial transaction\n\n- `storeExternalId` [String]: ID of the store in client's repository\n\n- `status` [String]: Status of the initial transaction (created|validated|rejected)\n\n- `rejectionReason` [String]: Rejection reason of the initial transaction if rejected. Possible values:\n      * purchaseNotFound - The transaction could not be found in our system\n      * bankConsentExpired - The bank consent has expired\n\n- `transactionDate` [String]: Date of the transaction, declared by the client (YYYY-MM-DD)\n\n- `transactionId` [String]: ID of the transaction in our system (provided only if automatically matched, null otherwise)\n\n- `date` [String]: Date when the initial transaction was created (in ISO 8601 format)\n\n```jsx\n{\n  event: \"initial_transaction_update\",\n  eventType: \"validated\",\n  customer: {\n    id: \"398f0b39-c205-4fb2-a225-70e042df3fdb\",\n    externalId: \"4564564564654\",\n  },\n  initialTransaction: {\n    id: \"b73dbe2b-b1d6-46f0-8e0c-3ff122de3c62\",\n    amount: 25.50,\n    storeExternalId: \"29894111110\",\n    status: \"validated\",\n    rejectionReason: null,\n    transactionDate: \"2025-01-15\",\n    transactionId: \"a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n    date: \"2025-01-15T10:30:00.000Z\",\n  }\n}\n```\n\n```jsx\n{\n  event: \"initial_transaction_update\",\n  eventType: \"rejected\",\n  customer: {\n    id: \"398f0b39-c205-4fb2-a225-70e042df3fdb\",\n    externalId: \"4564564564654\",\n  },\n  initialTransaction: {\n    id: \"b73dbe2b-b1d6-46f0-8e0c-3ff122de3c62\",\n    amount: 25.50,\n    storeExternalId: \"29894111110\",\n    status: \"rejected\",\n    rejectionReason: \"purchaseNotFound\",\n    transactionDate: \"2025-01-15\",\n    transactionId: null,\n    date: \"2025-01-15T10:30:00.000Z\",\n  }\n}\n```\n\n## offer_updated\n\nThis event is triggered when an offer of the loyalty program is created or updated.\n\n**Parameters in the body:**\n`event` [String]: the name of the webhook event (offer_updated)\n\n`shoppingHubId` [String]: Shopping Hub identifier\n\n`shoppingHubExternalId` [String]: Shopping Hub External identifier\n\n`offer:` [Object]\n\n- `id` [String]: the offer identifier\n\n- `status` [String] status of the offer (created|updated)\n\n- `startDate` [Date] challenge start date-time, in full-date format of RFC3339\n\n- `endDate` [Date] challenge end date-time, in full-date format of RFC3339\n\n- `name` [String] offer's name\n\n- `teaser` [String] offer's teaser\n\n- `rewardType` [String] offer's reward type, meaning what type of benefit you'll get when unlocking this offer (LTRY|RFND|GIFT_CARD) (Lottery, Refund in cashback, Gift card)\n\n- `offerType` [String] offer's type, meaning what kind of purchase trigger is searched for the shoppers (welcome|frequency|referral|average) \n\n- `rewardLabel` [String] offer's reward description\n\n- `rewardValue` [String] offer's reward value\n\n- `conditionLabel` [String] condition to complete the offer (label)\n\n- `conditionValue` [String] condition to complete the offer (value)\n\n- `active` [Boolean] true if the offer is active, false otherwise\n\n```jsx\n{\n  \"event\": \"offer_updated\",\n  \"shoppingHubExternalId\": \"90890289082\",\n  \"shoppingHubId\": \"492f0b39-c205-4fb2-a225-70e042df3fdb\",\n  \"offer\": {\n    \"id\": \"4f284506-f8e8-486a-994a-2fa0f62838e5\",\n    \"status\": \"created\",\n    \"startDate\": \"2023-05-31T22:00:00.000Z\",\n    \"endDate\": \"2023-06-30T22:00:00.000Z\",\n    \"name\": \"June 2023 offer\",\n    \"teaser\": \"Offre du mois de juin\",\n    \"offerType\": \"frequency\",\n    \"rewardType\": \"RFND\",\n    \"rewardLabel\": \"10 €\",\n    \"rewardValue\": \"10.00\",\n    \"conditionLabel\": \"Recevez 10€ pour 80€ d'achats cumulés\",\n    \"conditionValue\": \"80.00\",\n    \"active\": true\n  }\n}\n```\n## reward_updated\n\nThis event is triggered when a member is doing progress on a loyalty program's offer, which will potentially lead to a reward. A reward can have different statuses:\n\n- 'started': the member has made a first purchase eligible for a particular offer \n- 'pending': the member has made another purchase eligible for a particular offer\n- 'completed': the member has completed a particular offer\n- 'refunded': a benefit has been emitted for this reward (most often a cashback)\n\n**Parameters in the body:**\n`event` [String]: the name of the webhook event (reward_updated)\n\n`shoppingHubId` [String]: Shopping Hub identifier\n\n`shoppingHubExternalId` [String]: Shopping Hub External Identifier\n\n`customer:` [Object]\n\n- `id` [String]: Spaycial's member id\n\n- `externalId` [String]: The client's member id\n\n`reward:` [Object]\n\n- `id` [String]: the reward identifier\n\n- `status` [String] status of the reward (started|pending|completed|refunded)\n\n- `offerId` [String] the identifier of the offer (aka challenge) associated to this reward\n\n`offer:` [Object]\n\n- `id` [String]: the offer identifier\n\n- `startDate` [Date] challenge start date-time, in full-date format of RFC3339\n\n- `endDate` [Date] challenge end date-time, in full-date format of RFC3339\n\n- `name` [String] offer's name\n\n- `teaser` [String] offer's teaser\n\n- `rewardType` [String] offer's reward type, meaning what type of benefit you'll get when unlocking this offer (LTRY|RFND|GIFT_CARD) (Lottery, Refund in cashback, Gift card)\n\n- `offerType` [String] offer's type, meaning what kind of purchase trigger is searched for the shoppers (welcome|frequency|referral|average) \n\n- `rewardLabel` [String] offer's reward description\n\n- `rewardValue` [String] offer's reward value\n\n- `conditionLabel` [String] condition to complete the offer (label)\n\n- `conditionValue` [String] condition to complete the offer (value)\n\n```jsx\n{\n  \"event\": \"reward_updated\",\n  \"shoppingHubExternalId\": \"90890289082\",\n  \"shoppingHubId\": \"492f0b39-c205-4fb2-a225-70e042df3fdb\",\n  \"customer\": {\n    \"id\": \"41278549-d17e-49d2-be12-772bc5425892\",\n    \"externalId\": \"0f3ff415-bfc7-423b-9d5a-1caea428c920\"\n  },\n  \"reward\": {\n    \"id\": \"163284cd-af07-43ed-9178-257a44ae2474\",\n    \"status\": \"pending\",\n    \"offerId\": \"4f284506-f8e8-486a-994a-2fa0f62838e5\"\n  },\n  \"offer\": {\n      \"id\": \"4f284506-f8e8-486a-994a-2fa0f62838e5\",\n      \"status\": \"created\",\n      \"startDate\": \"2023-05-31T22:00:00.000Z\",\n      \"endDate\": \"2023-06-30T22:00:00.000Z\",\n      \"name\": \"June 2023 offer\",\n      \"teaser\": \"Offre du mois de juin\",\n      \"offerType\": \"frequency\",\n      \"rewardType\": \"RFND\",\n      \"rewardLabel\": \"10 €\",\n      \"rewardValue\": \"10.00\",\n      \"conditionLabel\": \"Recevez 10€ pour 80€ d'achats cumulés\",\n      \"conditionValue\": \"80.00\",\n    }\n}\n```\n","contact":{"email":"tech@spaycial.com"}},"basePath":"","schemes":["https"],"consumes":["application/json"],"produces":["application/json"],"paths":{"/banks":{"x-swagger-router-controller":"bank_api","get":{"description":"get bank list","operationId":"getBanks","tags":["bank"],"security":[{"apiKey":[]}],"parameters":[{"name":"cardType","type":"string","description":"type of card associated to this bank (bank vs restaurant )","enum":["bank","restaurant"],"in":"query"}],"responses":{"200":{"description":"Success","schema":{"type":"array","items":{"type":"object","title":"Bank","properties":{"id":{"type":"string","description":"bank id in data provider's repository"},"name":{"type":"string","description":"bank name"},"countryCode":{"type":"string","description":"country code of the bank"},"available":{"type":"boolean","description":"true if the bank is available for connection, false otherwise (use to make teasing on future banks)"},"interactive":{"type":"boolean","description":"true if the bank requires user interaction, false otherwise"},"cardType":{"type":"string","description":"type of card associated to this bank (bank vs restaurant )","enum":["bank","restaurant"]},"logoUrl":{"type":"string","description":"url of bank logo"},"type":{"type":"string","description":"type of data provider connection","enum":["PSD2","SCR"]}},"required":["id","name","countryCode","cardType"]},"example":{"application/json":[[{"id":"d9a25c93-bda9-4253-a49b-45f2a0979847","name":"A French Bank","countryCode":"FR","available":true,"cardType":"bank","logoUrl":"http://logo.com/frenchbank.png"},{"id":"4adb3a28-81e3-4e76-9a7f-ec59870b4893","name":"Rest DE","countryCode":"DE","available":false,"cardType":"rest","logoUrl":"http://logo.com/rest.png"}]]}}},"400":{"description":"Bad request","schema":{"type":"object","properties":{"code":{"type":"string","description":"Error codes for GET /banks\n* `invalidCountry` - Country parameter is invalid. Need to be 2 letters ISO code. Multiple countries seperated with comma.\n","enum":["invalidCountry"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/banks/{bankId}":{"x-swagger-router-controller":"bank_api","get":{"description":"get info about a bank, based on its id","operationId":"getBankById","tags":["bank"],"security":[{"apiKey":[]}],"parameters":[{"name":"locale","type":"string","description":"for some banks, a locale can be provided to define the bank portal language","in":"header","required":false},{"name":"bankId","type":"string","description":"bank identifier (found in GET /banks)","in":"path","required":true},{"name":"redirectURI","type":"string","description":"the URI where to redirect to when bank is of type 'PSD2'","in":"header","required":false},{"name":"customerId","type":"string","description":"id of the customer (will be used to create a customer in the provider )","in":"header","required":false},{"name":"psuId","type":"string","description":"psuId which is the identification number of the user","in":"header","required":false},{"name":"chosenAuthModel","type":"string","description":"the chosen authentication model which is redirect or decoupled","in":"header","required":false}],"responses":{"200":{"description":"Success","schema":{"type":"object","title":"Bank","properties":{"id":{"type":"string","description":"bank id in data provider's repository"},"name":{"type":"string","description":"bank name"},"countryCode":{"type":"string","description":"country code of the bank"},"available":{"type":"boolean","description":"true if the bank is available for connection, false otherwise (use to make teasing on future banks)"},"cardType":{"type":"string","description":"type of card associated to this bank (bank vs restaurant )","enum":["bank","restaurant"]},"type":{"type":"string","description":"type of data provider connection - CLO, PSD2, SCR","enum":["CLO","PSD2","SCR"]},"logoUrl":{"type":"string","description":"url of bank logo"},"authorizeURL":{"type":"string","description":"authorize url for the connection"},"dataProviderConnectionId":{"type":"string","description":"used by data provider to identify bank connection"},"decoupledDetails":{"type":"object","description":"if the connection is decoupled the details to resend to the back for verification are put here"},"fields":{"type":"array","title":"Array","description":"fields to fill (credentials) in order to connect to this bank","items":{"type":"object","title":"BankField","properties":{"name":{"type":"string","description":"name of the field (key to use when submitting field)"},"label":{"type":"string","description":"label of the field, to use for display"},"type":{"type":"string","enum":["text","password","select","date"],"description":"field input type"},"values":{"type":"array","title":"Array","description":"field options when field type is 'select'","items":{"type":"object","title":"BankSelectOptionValue","properties":{"value":{"type":"string","description":"value of the select item (to use when submitting field)"},"label":{"type":"string","description":"label of the select item, to use for display"}},"required":["value","label"]}},"required":{"type":"boolean","description":"true if the bank is field is required on bank connection update, false otherwise"},"requiredForUpdate":{"type":"boolean","description":"true if the bank is field is required on bank connection update, false otherwise"},"regex":{"type":"string"}},"required":["name","label","type","required","requiredForUpdate","regex"]}}},"required":["id","name","countryCode","cardType","available","fields"],"example":{"application/json":[{"id":"d9a25c93-bda9-4253-a49b-45f2a0979847","name":"A French Bank","countryCode":"FR","logoUrl":"http://www.example.com/logo-fb.png","cardType":"bank","available":true,"fields":[{"regex":null,"type":"text","name":"login","label":"Identifiant","required":true,"requiredForUpdate":false},{"regex":null,"type":"password","name":"password","label":"Mot de passe","required":true,"requiredForUpdate":true}]}]}}},"400":{"description":"Bad request","schema":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of GET /banks/:bankId\n* `invalidBankId` - Invalid bankId parameter\n* `bankNotFound` - Bank not found\n* `bankNotAvailable` - Bank not available for connection\n* `redirectURIRequired` - redirectURI is required for PSD2 bank\n* `invalidRedirectURI` - redirectURI is not valid\n* `bankNotFound` - Bank shortcut not exist in db\n","enum":["invalidBankId","bankNotAvailable","redirectURIRequired","invalidRedirectURI","bankNotFound"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/shoppingHubs":{"x-swagger-router-controller":"shopping_hub_api","get":{"description":"Retrieve a shopping hub based on its external id, customer external id or host (priority is given to customerExternalId)","operationId":"getShoppingHub","security":[],"tags":["shoppingHub"],"parameters":[{"name":"host","in":"query","type":"string","required":false,"description":"Retrieve the shopping hub with the given host."},{"name":"customerExternalId","in":"query","type":"string","required":false,"description":"Retrieve the shopping hub with the given customer external id"},{"name":"externalId","in":"query","type":"string","required":false,"description":"Retrieve the shopping hub with the given external id"}],"responses":{"200":{"description":"ShoppingHub","schema":{"type":"object","properties":{"id":{"type":"string","description":"the shopping hub id"},"name":{"type":"string","description":"the shopping hub Owner Name"},"shortcut":{"type":"string","description":"the shortcut"},"hubType":{"type":"string","description":"the hub type"},"city":{"type":"string","description":"the city"},"formattedAddress":{"type":"string","description":"the formatted Address"},"apiKey":{"type":"string","description":"the API key"},"country":{"type":"string","description":"the country"},"host":{"type":"string","description":"The host"},"contactEmail":{"type":"string","description":"The contact email"},"supportContactEmail":{"type":"string","description":"The support contact email"},"programName":{"type":"string","description":"the program Name"},"mainLanguage":{"type":"string","description":"the main Language"},"phoneRequired":{"type":"boolean","description":"the phone is Required"},"emailRequired":{"type":"boolean","description":"the email is Required"},"customerExternalIdRequired":{"type":"boolean","description":"the customer external id is Required"},"scanEnable":{"type":"boolean","description":"Determine if scan feature is enable for shopping hub"},"cardRestaurantEnable":{"type":"boolean","description":"The card restaurant is enabled"},"externalId":{"type":"string","description":"the external Id"},"recaptchaSiteKey":{"type":"string","description":"the reCaptcha key"},"googleAnalyticsId":{"type":"string","description":"the google anlytics Id"},"hotjarId":{"type":"string","description":"the hotjar Id"},"zendeskId":{"type":"string","description":"The Zendesk Id"},"fidelProgramId":{"type":"string","description":"the Fidel program id"},"currency":{"type":"string","description":"hub's currency in ISO_4217 format","minLength":3,"maxLength":3},"hasExternalFront":{"type":"boolean","description":"true if shopping hub has an external interface implementation, false otherwise"},"propertyManager":{"type":"string","description":"the property manager"},"cookieId":{"type":"string","description":"the cookie Id"},"cookieVersion":{"type":"string","description":"the cookie version"},"shoppingHubOwner":{"type":"object","description":"The Shopping Hub Owner general information","properties":{"id":{"type":"string","description":"the Shopping Hub Owner Id"},"name":{"type":"string","description":"the Shopping Hub Owner name"},"shortcut":{"type":"string","description":"the Shopping Hub Owner shortcut"},"transactionActivitiesIsDisplayed":{"type":"boolean","description":"display or don't display the customer's transactions table in the customer area"}}},"hasWestfield":{"type":"boolean","description":"client affiliation"},"interface":{"type":"object","properties":{"baseline":{"type":"string","description":"the baseline specific of each hub"},"colorPrimary":{"type":"string","description":"primary color of the hub uses in funnel and customer area"},"colorSecondary":{"type":"string","description":"The secondary color"},"css":{"type":"string","description":"the css of the shopping hub"},"logoProgramUrl":{"type":"string","description":"url of the program logo"},"faviconCode":{"type":"string","description":"code used to get the resources files of the hub"},"hasLandingPage":{"type":"boolean","description":"display or don't a landing page for the hub"}}},"cashbackProvider":{"type":"string","description":"The cashback provider active on this hub (ex. CO or MP)"},"checkoutPublicKey":{"type":"string","description":"The Checkout public key"},"programOffer":{"type":"string","description":"the program offer"},"scanConditions":{"type":"string","description":"the scan conditions"},"claimMinimumAmount":{"type":"string","description":"the minimum amount required when posting a claim"},"rewardType":{"type":"string","enum":["CASHBACK","GIFT_CARD"],"description":"Type of reward"},"languages":{"type":"array","description":"Array of available language for this shoppingHub","items":{"type":"object","description":"An available language for this shoppingHub","properties":{"country":{"type":"string","description":"the language associated to this item"},"favorite":{"type":"boolean","description":"the priority of this language"}}}},"features":{"type":"array","description":"Array of available features for this shoppingHub","items":{"type":"object","description":"An available feature for this shoppingHub","properties":{"name":{"type":"string"},"configuration":{"type":"object"}}}}}}},"400":{"description":"Bad request","schema":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of challenges API's\n* `requiredParameter` - At least one parameter is required\n","enum":["requiredParameter"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"401":{"description":"Unauthorized access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `expiredToken` - The Authorization header has expired\n* `unauthorized` - The route access is unauthorized\n","enum":["expiredToken","unauthorized"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/auth/optins":{"x-swagger-router-controller":"auth_api","get":{"description":"get optins list","operationId":"getOptins","tags":["auth"],"security":[{"apiKey":[]}],"parameters":[{"name":"lng","type":"string","description":"country code (2 letters) used to filter bank list by country","in":"query","required":false},{"name":"registrationType","type":"string","enum":["restaurant","receipt","CLO","PSD2","SCR","COM"],"description":"type of customer registration, default 'SCR' (optins depend on registation type)","in":"query","required":false}],"responses":{"200":{"description":"Success","schema":{"type":"array","items":{"type":"object","title":"Optin","properties":{"code":{"type":"string","description":"optin code"},"label":{"type":"string","description":"optin label"},"headerTranslationKey":{"type":"string","description":"optin header label key optional"},"required":{"type":"boolean","description":"true if optin is mandatory, false otherwise"}},"required":["code","label","required"]},"example":{"application/json":[[{"code":"optin1","label":"This optin is mandatory","required":true},{"code":"optin2","label":"This optin is optional","required":false}]]}}},"400":{"description":"Bad request","schema":{"type":"object","properties":{"code":{"type":"string","description":"Error codes for GET /banks\n* `invalidLanguage` - invalid language code\n","enum":["invalidLanguage"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/auth/registration":{"x-swagger-router-controller":"auth_api","post":{"description":"register to Spaycial using an identifier (mobile phone, email, external id, ...)","operationId":"postRegistration","tags":["auth"],"security":[{"apiKey":[]}],"parameters":[{"name":"registrationRequest","description":"body containing registration info","schema":{"type":"object","title":"RegistrationInfo","properties":{"phoneNumber":{"type":"string","description":"phone number, without any prefix"},"countryCode":{"type":"integer","description":"phone country code (i.e. 33 for France)"},"captcha":{"type":"string","description":"google recaptcha code to avoid bot registration"},"origin":{"type":"string","description":"customer origin","enum":["email","iOS-app","Android-app","website","desk"]},"referer":{"type":"string","description":"customer referer, a string identifying previous page visited before registering"},"customerExternalId":{"type":"string","description":"customer identifier in shopping hub repository"},"firstName":{"type":"string","description":"customer's first name"},"lastName":{"type":"string","description":"customer's last name"},"familyStatus":{"type":"string","description":"Family situation of the customer\n* `singleWithoutChildren` - single customer without children\n* `singleWithChildren` - single customer with children\n* `marriedWithoutChildren` - married customer without children\n* `marriedWithChildren` - married customer without children\n","enum":["singleWithoutChildren","singleWithChildren","marriedWithoutChildren","marriedWithChildren"]},"postalCode":{"type":"string","description":"The postal code of the address - can be alphanumeric, dashes or spaces"},"email":{"type":"string","description":"email of the customer"},"optins":{"type":"array","title":"Array","items":{"type":"object","properties":{"code":{"type":"string","description":"optin code get from GET /auth/optins API"},"value":{"type":"boolean","description":"true if the optin has been validated, false otherwhise"}}}},"outsideOptIn":{"type":"boolean","description":"true if customer accepts its out of mall transactions to be analyzed, false otherwhise"},"referralInfo":{"type":"object","title":"ReferralInfo","description":"referral information to get referral offer","properties":{"code":{"type":"string","description":"referral code"},"phoneNumber":{"type":"string","description":"referral's phone number, without any prefix"},"countryCode":{"type":"integer","description":"referral's phone country code (i.e. 33 for France)"}}},"preferredLanguage":{"type":"string","description":"customer preferred language for communication (email, sms...) - ISO 639-1 format is expected (i.e. fr-FR or en)"},"transactionsEligibleFromDate":{"type":"number","description":"Unix Timestamp (in seconds) representing the start date from where the customer's transactions will be pushed. If not provided, it will default to the customer's registrationDate"}}},"in":"body","required":true}],"responses":{"200":{"description":"Success","schema":{"type":"object","properties":{"customerId":{"type":"string","description":"id of connected customer"},"bankAlreadyConnected":{"type":"boolean","description":"true if customer is already known and has a bank account connected, false otherwhise"},"registrationToken":{"type":"string","description":"registration token to provide along the registration requests"}},"required":["customerId","bankAlreadyConnected"],"example":{"application/json":[{"customerId":"91c2003e-3eb0-87c6-ac8d-4fcaad4cbd19","bankAlreadyConnected":false}]}}},"400":{"description":"Bad request","schema":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of registration\n* `phoneRequired` - phone number is required (countryCode + phoneNumber)\n* `emailRequired` - email is required\n* `customerExternalIdRequired` - customer external id (in hub repository)\n* `captchaRequired` - recaptcha code is required to ensure submission is not made by a bot\n* `invalidBirthDate` - birth date provided is invalid\n* `invalidEmail` - email is invalid\n* `invalidLanguage` - invalid preferred language\n* `invalidCaptcha` - provided captcha is invalid\n* `invalidOptins` - provided optins are invalid\n* `emailAlreadyUsed` - email is already taken\n* `externalIdAlreadyUsed` - external id is already taken\n* `numberAlreadyUsed` - phone number is already taken (legacy code, same as phoneAlreadyUsed)\n* `alreadyRegistered` - given customer already complete registration process\n* `invalidSponsorshipCode` - No valid sponsorship code\n* `invalidTransactionsEligibleFromDate` - Invalid transactionsEligibleFromDate: Valid values are dates between today and past 90 days\n* `invalidRegistration` - Registration is currently unavailable for this shopping hub\n","enum":["phoneRequired","emailRequired","customerExternalIdRequired","captchaRequired","invalidBirthDate","invalidEmail","invalidCaptcha","invalidLanguage","emailAlreadyUsed","phoneAlreadyUsed","externalIdAlreadyUsed","numberAlreadyUsed","alreadyRegistered","invalidSponsorshipCode"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/auth/receipt":{"x-swagger-router-controller":"auth_api","post":{"description":"Allows a customer to register by uploading a receipt","operationId":"postFirstReceipt","tags":["customer","auth"],"security":[{"registrationJWT":[]}],"consumes":["multipart/form-data"],"parameters":[{"name":"image","description":"Image of the receipt to upload","in":"formData","type":"file","required":false},{"name":"customerId","description":"Customer identifier","in":"formData","type":"string","required":true},{"name":"optins","description":"Stringified optins JSON object which contains array of optins objects with string code and boolean value","in":"formData","type":"string","required":true}],"responses":{"200":{"description":"Success","schema":{"type":"object","properties":{"isProperReceiptExtract":{"type":"boolean","description":"true if extracted data contains all essential information we need, false otherwhise"}},"example":{"application/json":[{"isProperReceiptExtract":true}]}}},"400":{"description":"Bad request","schema":{"type":"object","properties":{"code":{"type":"string","description":"Error codes for POST /customer/receipts and POST /auth/receipt\n* `invalidCustomer` - Invalid customer identifier\n* `invalidOptins` - optins parameter is invalid\n* `invalidFileType` - Invalid file type\n* `tooLargeFile` - The provided file is too large\n","enum":["invalidCustomer","invalidOptins","invalidFileType","tooLargeFile"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"401":{"description":"Unauthorized access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `expiredToken` - The Authorization header has expired\n* `unauthorized` - The route access is unauthorized\n","enum":["expiredToken","unauthorized"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"404":{"description":"Not found","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["resourceNotFound"]},"message":{"type":"string","description":"a short error description"}}}},"409":{"description":"Conflict","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["alreadyExists"]},"message":{"type":"string","description":"a short error description"}}}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/auth/bank/connectionCallback":{"x-swagger-router-controller":"auth_api","post":{"description":"Add a first bank connection to customer by providing bank website callback code","operationId":"postBankConnectionCallback","tags":["auth"],"security":[{"apiKey":[],"registrationJWT":[]}],"parameters":[{"name":"connectionRequest","description":"body containing connection info","schema":{"type":"object","properties":{"customerId":{"type":"string","description":"customer identifier get from /auth/register response"},"bankId":{"type":["string","null"],"description":"identifier of the bank to connect with (found in GET /banks)"},"dataProviderConnectionId":{"type":["string","null"],"description":"identifier of the bank connection in data provider repository (found in GET /banks)"},"queryString":{"type":"object","description":"object containing the temp code retrieved from psd2 callback login and the customer_id"},"redirectUri":{"type":"string","description":"the URI where to redirect to"}},"required":["customerId"]},"in":"body","required":true}],"responses":{"200":{"description":"A jwt token to access Spaycial authenticated APIs","schema":{"type":"object","properties":{"bankConnectionId":{"type":"string","description":"the identifier of the bank connection created"},"accessToken":{"type":"string","description":"access token, to provide in Authorization header for matching routes"}},"required":["bankConnectionId","accessToken"],"example":{"application/json":[{"bankConnectionId":"c0b88330-ec05-49c3-99eb-e67b1a1e3fc9","accessToken":"xxxxx.yyyyy.zzzzz"}]}}},"400":{"description":"Bad request","schema":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of bank connection\n* `bankNotFound` - Bank not found\n* `customerNotFound` - Customer not found\n* `bankNotAvailable` - Bank exists but is not available for connection\n* `alreadyRegistered` - Customer already complete registration process\n* `bankAlreadyConnected` - Customer already has a bank connection\n* `credentialsRequired` - Credentials are required\n* `invalidCredentials` - Provided credentials are invalid\n* `actionNeeded` - An action is needed on the bank website\n* `alreadyUsedCredentials` - Credentials already used\n* `invalidCustomer` - Invalid customer id\n* `providerError` - Failed to create connection with the bank\n","enum":["bankNotFound","customerNotFound","bankNotAvailable","alreadyRegistered","bankAlreadyConnected","credentialsRequired","invalidCredentials","actionNeeded","alreadyUsedCredentials","invalidCustomer","providerError"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/auth/token":{"x-swagger-router-controller":"auth_api","get":{"description":"Get an access token for the given customerId or customerExternalId.\n\nPlease note that before generating the access token, we need to verify your customer's external token (see [here](#section/Introduction/Creating-a-validation-end-point-to-verify-your-user's-external-access-token) for detailed information on how we proceed)\n","operationId":"getAccessToken","tags":["auth"],"security":[{"apiKey":[],"signature":[]}],"parameters":[{"name":"customerId","type":"string","description":"customer identifier get from /auth/register response","in":"header","required":false},{"name":"customerExternalId","type":"string","description":"the customer external id","in":"header","required":false},{"name":"x-access-token","type":"string","description":"the customer access token in mall repository","in":"header","required":true},{"name":"Expires-at","type":"integer","description":"request expiration time as a UNIX timestamp in UTC timezone. We suggest to use +1 minute from the current time.","in":"header"}],"responses":{"200":{"description":"Success","schema":{"type":"object","properties":{"accessToken":{"type":"string","description":"access token, to provide in Authorization header for matching routes"}},"required":["accessToken"],"example":{"application/json":[{"accessToken":"xxxxx.yyyyy.zzzzz"}]}}},"400":{"description":"Bad request","schema":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of GET /auth/token\n* `invalidCustomer` - Invalid customer id\n* `invalidExternalToken` - Invalid external token\n* `customerNotFound` - Customer not found\n* `incompleteRegistration` - Customer must complete registration\n","enum":["invalidCustomer","invalidExternalToken","customerNotFound","incompleteRegistration"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/auth/login":{"x-swagger-router-controller":"auth_api","post":{"description":"login to Spaycial using mobile phone and password","operationId":"postLogin","tags":["auth"],"security":[{"apiKey":[]}],"parameters":[{"name":"authLoginRequest","description":"the body containing login info","schema":{"type":"object","properties":{"phoneNumber":{"type":"string","description":"phone number, without any prefix"},"countryCode":{"type":"integer","description":"phone country code (i.e. 33 for France)"},"email":{"type":"string","description":"customer's email"},"password":{"type":"string","description":"customer's area password"}},"required":["password"]},"in":"body","required":true}],"responses":{"200":{"description":"Success","schema":{"type":"object","properties":{"accessToken":{"type":"string","description":"access token, to provide in Authorization header for matching routes"}},"required":["accessToken"],"example":{"application/json":[{"accessToken":"xxxxx.yyyyy.zzzzz"}]}}},"400":{"description":"Bad request","schema":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of POST /auth/login\n* `incompleteRegistration` - Customer must complete registration before he can login\n* `invalidCredentials` - Invalid credentials\n* `blockedAccount` - Account is blocked\n","enum":["customerNotFound","incompleteRegistration"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/auth/passwordEmailConfirmation":{"x-swagger-router-controller":"auth_api","get":{"description":"get an email containing a URL to confirm the password creation request","operationId":"getPasswordEmailConfirmation","tags":["auth"],"security":[{"apiKey":[]}],"parameters":[{"name":"email","type":"string","description":"customer's email","in":"header","required":true}],"responses":{"204":{"description":"Success"},"400":{"description":"Bad request","schema":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of GET /auth/login\n* `emailNotFound` - Email not found\n* `incompleteRegistration` - Customer must complete registration\n","enum":["emailNotFound","incompleteRegistration"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/auth/temporaryCode":{"x-swagger-router-controller":"auth_api","get":{"description":"get an SMS temporary code to confirm customer identity","operationId":"getTemporaryCode","tags":["auth"],"security":[{"apiKey":[]}],"parameters":[{"name":"phoneNumber","type":"string","description":"phone number, without any prefix","in":"header","required":true},{"name":"countryCode","type":"integer","description":"phone country code (i.e. 33 for France)","in":"header","required":true}],"responses":{"204":{"description":"Success"},"400":{"description":"Bad request","schema":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of GET /auth/temporaryCode\n* `unknownPhone` - Invalid phone number\n* `incompleteRegistration` - Customer must complete registration before asking a temporary code\n","enum":["unknownPhone","incompleteRegistration"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"401":{"description":"Unauthorized access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `expiredToken` - The Authorization header has expired\n* `unauthorized` - The route access is unauthorized\n","enum":["expiredToken","unauthorized"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}},"post":{"description":"post the temporary code received via SMS to confirm identity","operationId":"postTemporaryCode","tags":["auth"],"security":[{"apiKey":[]}],"parameters":[{"name":"postTemporaryCodeRequest","description":"the body containing code information","schema":{"type":"object","properties":{"phoneNumber":{"type":"string","description":"phone number, without any prefix"},"countryCode":{"type":"integer","description":"phone country code (i.e. 33 for France)"},"temporaryCode":{"type":"string","description":"temporary code, received by SMS"}},"required":["phoneNumber","countryCode","temporaryCode"]},"in":"body","required":true}],"responses":{"200":{"description":"Success","schema":{"type":"object","properties":{"accessToken":{"type":"string","description":"access token, to provide in Authorization header for matching routes"}},"required":["accessToken"],"example":{"application/json":[{"accessToken":"xxxxx.yyyyy.zzzzz"}]}}},"400":{"description":"Bad request","schema":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of POST /auth/temporaryCode\n* `unknownPhone` - Invalid phone number\n* `incompleteRegistration` - Customer must complete registration before sending a temporary code\n* `invalidCode` - Provided code is invalid\n* `askCodeBefore` - No code asked before\n* `maxAttemptReached` - Max attempt reached\n* `expiredCode` - Code is too old\n","enum":["unknownPhone","incompleteRegistration","invalidCode","askCodeBefore","maxAttemptReached","expiredCode"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"401":{"description":"Unauthorized access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `expiredToken` - The Authorization header has expired\n* `unauthorized` - The route access is unauthorized\n","enum":["expiredToken","unauthorized"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/admin/stores/recommendation":{"x-swagger-router-controller":"admin_api","get":{"description":"get store recommendations for a list of customers","operationId":"storesRecommendation","tags":["admin"],"parameters":[{"name":"options","in":"body","required":true,"schema":{"type":"object","title":"options","properties":{"customerList":{"type":"array","description":"list of customer ids","items":{"type":"string"}}}}}],"security":[{"apiKey":[],"signature":[]}],"responses":{"200":{"description":"return an array of object with all the stores"}}}},"/admin/stores":{"x-swagger-router-controller":"admin_api","get":{"description":"get all stores with for a given shoppingHub","operationId":"getStoresList","tags":["admin"],"security":[{"apiKey":[],"signature":[]}],"responses":{"200":{"description":"return an array of object with all the stores","schema":{"type":"array","items":{"type":"object","properties":{"shoppingHubShortcut":{"type":"string","description":"shoppingHub shortcut"},"storeExternalId":{"type":"string","description":"store external id"},"retailerName":{"type":"string","description":"retailer name of the store"},"address":{"type":"string","description":"address of the store"},"locality":{"type":"string","description":"locality of the store"},"inProgram":{"type":"boolean","description":"true if the store is part of the program, false otherwise"},"closingDate":{"type":"string","description":"date-time when the store is permanently closed","format":"date-time"},"status":{"type":"string","description":"the store status. 'open' means the store is currently open for business, 'permanently_closed' means the store is permanently_closed and will never reopen.","enum":["open","permanently_closed"]}}}}},"401":{"description":"Unauthorized access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `expiredToken` - The Authorization header has expired\n* `unauthorized` - The route access is unauthorized\n","enum":["expiredToken","unauthorized"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}},"502":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["badGetaway"]},"message":{"type":"string","description":"a short error description"}}}}}},"post":{"description":"DEPRECATED - Post the store referential of a shoppingHub (you need to provide the full store list as our system is currenlty not able to handle diff updates) (deprecated, please use POST /admin/stores/v2 for a smoother and faster store sync)","operationId":"postStoresList","tags":["admin"],"security":[{"apiKey":[],"signature":[]}],"parameters":[{"name":"stores","description":"the body containing the stores information","schema":{"type":"object","properties":{"stores":{"type":"array","minItems":1,"maxItems":500,"items":{"type":"object","properties":{"storeExternalId":{"type":"string","description":"the store identifier in the client repository"},"retailerName":{"type":"string","description":"retailer name (brand name) for the store to create"},"address":{"type":"string","description":"formatted address of the store"},"locality":{"type":["null","string"],"description":"locality (most often a city) of the store"}},"required":["storeExternalId","retailerName"]}}}},"in":"body","required":true}],"responses":{"200":{"description":"success","schema":{"type":"object","properties":{"requestId":{"type":"string","description":"a unique identifier for the store synchronization request"}}}},"400":{"description":"Bad request","schema":{"type":"object","properties":{"code":{"type":"string","description":"Error codes\n* `invalidStores` - The store list is invalid. It should be an array of 1 to 500 items\n","enum":["invalidStores"]}}}},"401":{"description":"Unauthorized access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `expiredToken` - The Authorization header has expired\n* `unauthorized` - The route access is unauthorized\n","enum":["expiredToken","unauthorized"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/admin/stores/v2":{"x-swagger-router-controller":"admin_api","post":{"description":"Synchronize the program's store list with the Spaycial repository (for the updates, you don't have to provide the full store list as our system is able to handle incremental updates)","operationId":"postStoresListV2","tags":["admin"],"security":[{"apiKey":[],"signature":[]}],"parameters":[{"name":"stores","description":"the body containing the stores information","schema":{"type":"object","properties":{"stores":{"type":"array","minItems":1,"maxItems":500,"items":{"type":"object","properties":{"externalId":{"type":"string","minLength":1,"description":"the store identifier in your repository"},"brandName":{"type":"string","minLength":1,"description":"retailer name (brand name) for the store to create"},"isOnline":{"type":"boolean","description":"true if the store is an online point of sale, false if it's a brick and mortar point of sale"},"googlePlaceId":{"type":"string","minLength":1,"description":"the Google Places Identifier of the store, required when isOnline=false (see https://developers.google.com/maps/documentation/places/web-service/place-id)"},"website":{"type":"string","description":"the website of the store (ex. 'https://my-fashion-store.com'), required when isOnline=true"},"status":{"type":"string","description":"the store status. 'open' means the store is currently open for business, 'permanently_closed' means the store is permanently_closed and will never reopen.","enum":["open","permanently_closed"]},"inProgram":{"type":"boolean","description":"true if the store is part of the program (default value if not provided), false otherwise (for instance, in a loyalty program, a supermarket could be located in the mall but could be excluded from the offers of the program)"},"closingDate":{"type":"string","description":"date-time when the store has permanently closed (don't set this date if a store is temporary closed)","format":"date-time"}},"required":["externalId","brandName","isOnline","status"]}}}},"in":"body","required":true}],"responses":{"200":{"description":"success","schema":{"type":"object"}},"400":{"description":"Bad request","schema":{"type":"object","properties":{"code":{"type":"string","description":"Error codes\n* `RequestValidationError` - OpenAPI format error (for instance if a required parameter is missing or does not have the right format)\n","enum":["RequestValidationError"]}}}},"401":{"description":"Unauthorized access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `expiredToken` - The Authorization header has expired\n* `unauthorized` - The route access is unauthorized\n","enum":["expiredToken","unauthorized"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/shoppingHub/webhooks":{"x-swagger-router-controller":"shopping_hub_api","get":{"description":"get all the subscribed webhooks","operationId":"getWebhooks","tags":["shoppingHub"],"security":[{"apiKey":[],"signature":[]}],"responses":{"200":{"description":"Success","schema":{"type":"array","items":{"type":"object","properties":{"webhookId":{"type":"string","description":"the webhook id"},"name":{"type":"string","description":"an optional webhook name"},"url":{"type":"string","description":"the webhook endpoint to post events"},"events":{"type":"array","items":{"type":"string","description":"Webhook events\n* `bank_connections_update` - A bank connection has failed or resolved\n* `bank_connections_update_v2` - A bank connection is created, updated or removed\n* `bank_status_update` - Event trigger when bank active status is updated\n* `bank_association_notification` - A bank has been removed or added to a program\n* `cashback_method_updated` - A cashback method (IBAN or credit card)\n* `cashbacks_updated` - A cashback has been updated\n* `customer_creation` - A customer has been created\n* `customer_subscription` - A customer subscribed\n* `customer_transactions` - A customer transaction has been created (mall programs only)\n* `all_transactions` - All enriched transactions for non-mall programs\n* `receipt_updated` - A receipt status has been updated (pending, validated, rejected)\n* `store_list_updated` - A request has been made to POST /admin/stores and the store referential update is over\n* `offer_updated` - An offer of the loyalty program has been created or updated\n* `reward_updated` - A member of the program has made progress on a given offer\n* `initial_transaction_update` - An initial transaction status has been updated (created, validated, rejected)\n","enum":["bank_connections_update","bank_status_update","bank_association_notification","bank_connections_update_v2","customer_creation","customer_subscription","customer_transactions","all_transactions","receipt_updated","cashback_method_updated","cashbacks_updated","store_list_updated","offer_updated","reward_updated","initial_transaction_update"]}},"active":{"type":"boolean","description":"whether the webhook is active"}}}},"examples":{"application/json":[[{"webhookId":"055b00a5-bd3e-482e-897c-0bcca6054dcf","name":"Webhook Spaycial","url":"https://transactionconnect.com/webhook","events":["cashbacks_updated","cashback_method_updated","bank_connections_update","bank_connections_update_v2","receipt_updated","customer_transactions","all_transactions","customer_creation","customer_subscription","claim_update","initial_transaction_update"],"active":true}]]}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/admin/sendInitialTransaction":{"x-swagger-router-controller":"admin_api","post":{"description":"Send an initial transaction for store enrichment setup. This allows clients to send transaction information to initialize the enrichment algorithm for a store.","operationId":"postSendInitialTransaction","tags":["admin"],"security":[{"apiKey":[],"signature":[]}],"parameters":[{"name":"SendInitialTransactionRequest","description":"the body containing the initial transaction information","schema":{"type":"object","properties":{"customerExternalId":{"type":"string","description":"the customer identifier in the client repository"},"storeExternalId":{"type":"string","description":"the store identifier in the client repository (must match the externalId provided when syncing stores via POST /admin/stores/v2)"},"transactionDate":{"type":"string","format":"date","description":"the date of the transaction (YYYY-MM-DD)"},"transactionAmount":{"type":"number","description":"the amount of the transaction"},"transactionLabel":{"type":"string","description":"the label of the transaction (optional but could help to spot the transaction)"}},"required":["customerExternalId","storeExternalId","transactionDate","transactionAmount"]},"in":"body","required":true}],"responses":{"201":{"description":"Initial transaction created successfully"},"400":{"description":"Bad request","schema":{"type":"object","properties":{"code":{"type":"string","description":"Error codes for initial transaction\n* `customerExternalIdRequired` - Customer external ID is required\n* `storeExternalIdRequired` - Store external ID is required\n* `transactionDateRequired` - Transaction date is required\n* `transactionAmountRequired` - Transaction amount is required\n* `invalidTransactionDate` - Transaction date is invalid\n* `invalidAmount` - Transaction amount is invalid\n* `customerNotFound` - Customer not found\n* `storeNotFound` - Store not found\n","enum":["customerExternalIdRequired","storeExternalIdRequired","transactionDateRequired","transactionAmountRequired","invalidTransactionDate","invalidAmount","customerNotFound","storeNotFound"]},"message":{"type":"string","description":"Error message"}},"required":["requestId"]}},"401":{"description":"Unauthorized access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `expiredToken` - The Authorization header has expired\n* `unauthorized` - The route access is unauthorized\n","enum":["expiredToken","unauthorized"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"404":{"description":"Customer or store not found","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["resourceNotFound"]},"message":{"type":"string","description":"a short error description"}}}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/shoppingHub/webhook":{"x-swagger-router-controller":"shopping_hub_api","post":{"description":"add a webhook too be posted events onto","operationId":"postWebhook","tags":["shoppingHub"],"security":[{"apiKey":[],"signature":[]}],"parameters":[{"name":"postWebhookRequest","description":"body containing connection info","schema":{"type":"object","properties":{"name":{"type":"string","description":"an optional webhook name to let the client identify the webhooks"},"url":{"type":"string","description":"the webhook endpoint to post events"},"events":{"type":"array","minItems":1,"items":{"type":"string","description":"Webhook events\n* `bank_connections_update` - A bank connection has failed or resolved\n* `bank_connections_update_v2` - A bank connection is created, updated or removed\n* `bank_status_update` - Event trigger when bank active status is updated\n* `bank_association_notification` - A bank has been removed or added to a program\n* `cashbacks_updated` - A cashback has been updated\n* `customer_creation` - A customer has been created\n* `customer_subscription` - A change occurred in a customer subscription\n* `claim_update` - A claim has been posted, validated or rejected\n* `customer_transactions` - A customer transaction has been created (mall programs only)\n* `all_transactions` - All enriched transactions for non-mall programs\n* `receipt_updated` - A receipt status has been updated (pending, validated, rejected)\n* `cashback_method_updated` - A cashback method (IBAN or credit card)\n* `store_list_updated` - A request has been made to POST /admin/stores and the store referential update is over\n* `offer_updated` - An offer of the loyalty program has been created or updated\n* `reward_updated` - A member of the program has made progress on a given offer\n* `initial_transaction_update` - An initial transaction status has been updated (created, validated, rejected)\n","enum":["bank_connections_update","claim_update","bank_status_update","bank_association_notification","bank_connections_update_v2","customer_creation","customer_subscription","customer_transactions","all_transactions","receipt_updated","cashback_method_updated","cashbacks_updated","store_list_updated","offer_updated","reward_updated","initial_transaction_update"]}},"active":{"type":"boolean","description":"weather the webhook is active","default":true}},"required":["url","events"]},"in":"body","required":true}],"responses":{"200":{"description":"Success","schema":{"type":"object","properties":{"webhookId":{"type":"string","description":"the webhook id"}},"required":["webhookId"]}},"400":{"description":"Bad request","schema":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of bank connection\n* `invalidURL` - Url is not valid\n* `eventDoesNotExist` - Some events doeas not exist\n* `invalidApiKeyHeader` - Invalid Api-Key header\n","enum":["invalidURL","eventDoesNotExist","invalidApiKeyHeader"]}}}},"401":{"description":"Unauthorized access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `expiredToken` - The Authorization header has expired\n* `unauthorized` - The route access is unauthorized\n","enum":["expiredToken","unauthorized"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}},"patch":{"description":"patch an existing webhook","operationId":"patchWebhook","tags":["shoppingHub"],"security":[{"apiKey":[],"signature":[]}],"parameters":[{"name":"patchWebhookRequest","description":"body containing connection info","schema":{"type":"object","properties":{"webhookId":{"type":"string","description":"the webhookId to patch"},"name":{"type":"string","description":"an optional webhook name to let the client identify the webhooks"},"url":{"type":"string","description":"the webhook endpoint to post events"},"events":{"type":"array","minItems":1,"items":{"type":"string","description":"Webhook events\n* `bank_connections_update` - A bank connection has failed or resolved\n* `bank_connections_update_v2` - A bank connection is created, updated or removed\n* `bank_status_update` - Event trigger when bank active status is updated\n* `bank_association_notification` - A bank has been removed or added to a program\n* `cashbacks_updated` - A cashback has been updated\n* `customer_creation` - A customer has been created\n* `customer_subscription` - A customer subscribed\n* `customer_transactions` - A customer transaction has been created (mall programs only)\n* `all_transactions` - All enriched transactions for non-mall programs\n* `receipt_updated` - A receipt status has been updated (pending, validated, rejected)\n* `cashback_method_updated` - A cashback method (IBAN or credit card)\n* `store_list_updated` - A request has been made to POST /admin/stores and the store referential update is over\n* `offer_updated` - An offer of the loyalty program has been created or updated\n* `reward_updated` - A member of the program has made progress on a given offer\n* `initial_transaction_update` - An initial transaction status has been updated (created, validated, rejected)\n","enum":["bank_connections_update","bank_status_update","bank_association_notification","bank_connections_update_v2","customer_creation","customer_subscription","customer_transactions","all_transactions","receipt_updated","cashback_method_updated","cashbacks_updated","store_list_updated","offer_updated","reward_updated","initial_transaction_update"]}},"active":{"type":"boolean","description":"weather the webhook is active","default":true}},"required":["webhookId"]},"in":"body","required":true}],"responses":{"200":{"description":"Success","schema":{"type":"object","properties":{"webhookId":{"type":"string","description":"the webhook id"}},"required":["webhookId"]}},"400":{"description":"Bad request","schema":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of bank connection\n* `invalidURL` - Url is not valid\n* `eventDoesNotExist` - Some events doeas not exist\n* `invalidApiKeyHeader` - Invalid Api-Key header\n","enum":["invalidURL","eventDoesNotExist","invalidApiKeyHeader"]}}}},"401":{"description":"Unauthorized access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `expiredToken` - The Authorization header has expired\n* `unauthorized` - The route access is unauthorized\n","enum":["expiredToken","unauthorized"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"404":{"description":"Not found","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["resourceNotFound"]},"message":{"type":"string","description":"a short error description"}}}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/shoppingHub/webhook/{webhookId}":{"x-swagger-router-controller":"shopping_hub_api","delete":{"description":"delete a webhook and its associated events","operationId":"deleteWebhook","tags":["shoppingHub"],"security":[{"apiKey":[],"signature":[]}],"parameters":[{"name":"webhookId","in":"path","description":"the webhookId","required":true,"type":"string"}],"responses":{"204":{"description":"Success"},"401":{"description":"Unauthorized access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `expiredToken` - The Authorization header has expired\n* `unauthorized` - The route access is unauthorized\n","enum":["expiredToken","unauthorized"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"404":{"description":"Not found","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["resourceNotFound"]},"message":{"type":"string","description":"a short error description"}}}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/customer":{"x-swagger-router-controller":"customer_api","get":{"description":"Get current customer information (deduced from header token)","operationId":"getCustomer","tags":["customer"],"security":[{"JWT":[]}],"responses":{"200":{"description":"Success","schema":{"type":"object","title":"CustomerInfo","properties":{"customerId":{"type":"string","description":"customer's id"},"hubExternalId":{"type":"string","description":"hub external id'"},"hubName":{"type":"string","description":"hub's name"},"firstName":{"type":"string","description":"customer's first name"},"lastName":{"type":"string","description":"customer's last name"},"scanEnable":{"type":"boolean","description":"true if scan is enable for customer, false otherwise"},"email":{"type":"string","description":"customer's email"},"bankAlreadyConnected":{"type":"boolean","description":"information about customer's bank connection"},"registered":{"type":"boolean","description":"true if customer is registered, false otherwise"},"phoneVerified":{"type":"boolean","description":"information about customer's phone verfication"},"phoneNumber":{"type":"string","description":"phone number, without any prefix"},"countryCode":{"type":"integer","description":"phone country code (i.e. 33 for France)"},"createdAt":{"type":"string","description":"date-time of the customer's creation","format":"date-time"},"referralCode":{"type":"string","description":"the referral code of a customer"}},"required":["bankAlreadyConnected","customerId","scanEnable","registered","createdAt"],"example":{"application/json":[{"customerId":"c5562d40-be8b-43cf-88ca-96933e76629f","firstName":"John","bankAlreadyConnected":true,"email":"foo@bar.com","phoneVerified":true,"registered":true,"createdAt":"2018-10-19T16:07:05.887Z"}]}}},"401":{"description":"Unauthorized access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `expiredToken` - The Authorization header has expired\n* `unauthorized` - The route access is unauthorized\n","enum":["expiredToken","unauthorized"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"404":{"description":"Not found","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["resourceNotFound"]},"message":{"type":"string","description":"a short error description"}}}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}},"patch":{"description":"update current customer","operationId":"patchCustomer","tags":["customer"],"parameters":[{"name":"customerInfo","in":"body","required":true,"schema":{"type":"object","title":"Customer","properties":{"firstName":{"type":"string","description":"customer's first name"},"lastName":{"type":"string","description":"customer's last name"},"email":{"type":"string","description":"customer's email"},"phoneNumber":{"type":"string","description":"phone number, without any prefix"},"countryCode":{"type":"integer","description":"phone country code (i.e. 33 for France)"},"password":{"type":"string","description":"customer's password"},"outsideOptIn":{"type":"boolean","description":"true if customer accepts its out of mall transactions to be analyzed, false otherwhise"},"preferredLanguage":{"type":"string","description":"customer preferred language for communication (email, sms...) - ISO 639-1 format is expected (i.e. fr-FR or en)"},"postalCode":{"type":"string","description":"The postal code of the customer"},"familyStatus":{"type":"string","description":"Family situation of the customer\n* `singleWithoutChildren` - single customer without children\n* `singleWithChildren` - single customer with children\n* `marriedWithoutChildren` - married customer without children\n* `marriedWithChildren` - married customer without children\n","enum":["singleWithoutChildren","singleWithChildren","marriedWithoutChildren","marriedWithChildren"]}}}}],"responses":{"200":{"description":"Success","schema":{"type":"object","title":"CustomerInfo","properties":{"customerId":{"type":"string","description":"customer's id"},"hubExternalId":{"type":"string","description":"hub external id'"},"hubName":{"type":"string","description":"hub's name"},"firstName":{"type":"string","description":"customer's first name"},"lastName":{"type":"string","description":"customer's last name"},"scanEnable":{"type":"boolean","description":"true if scan is enable for customer, false otherwise"},"email":{"type":"string","description":"customer's email"},"bankAlreadyConnected":{"type":"boolean","description":"information about customer's bank connection"},"registered":{"type":"boolean","description":"true if customer is registered, false otherwise"},"phoneVerified":{"type":"boolean","description":"information about customer's phone verfication"},"phoneNumber":{"type":"string","description":"phone number, without any prefix"},"countryCode":{"type":"integer","description":"phone country code (i.e. 33 for France)"},"createdAt":{"type":"string","description":"date-time of the customer's creation","format":"date-time"},"referralCode":{"type":"string","description":"the referral code of a customer"}},"required":["bankAlreadyConnected","customerId","scanEnable","registered","createdAt"],"example":{"application/json":[{"customerId":"c5562d40-be8b-43cf-88ca-96933e76629f","firstName":"John","bankAlreadyConnected":true,"email":"foo@bar.com","phoneVerified":true,"registered":true,"createdAt":"2018-10-19T16:07:05.887Z"}]}}},"400":{"description":"Bad request","schema":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of PATCH /customer\n* `nothingToPatch` - No customer attributes to patch was provided\n* `invalidPassword` - Password format is invalid\n* `invalidBirthDate` - Birth date format is invalid\n* `invalidLanguage` - invalid preferred language\n* `invalidEmail` - Email is invalid\n* `emailAlreadyUsed` - Email already linked to an account\n* `numberAlreadyUsed` - Phone number already linked to an account\n","enum":["nothingToPatch","invalidPassword","invalidBirthDate","invalidEmail","invalidLanguage","emailAlreadyUsed","numberAlreadyUsed"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"401":{"description":"Unauthorized access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `expiredToken` - The Authorization header has expired\n* `unauthorized` - The route access is unauthorized\n","enum":["expiredToken","unauthorized"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"404":{"description":"Not found","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["resourceNotFound"]},"message":{"type":"string","description":"a short error description"}}}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}},"delete":{"description":"Delete current customer in the Spaycial repository (deduced from header token)","operationId":"deleteCustomer","tags":["customer"],"responses":{"204":{"description":"Success"},"401":{"description":"Unauthorized access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `expiredToken` - The Authorization header has expired\n* `unauthorized` - The route access is unauthorized\n","enum":["expiredToken","unauthorized"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"404":{"description":"Not found","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["resourceNotFound"]},"message":{"type":"string","description":"a short error description"}}}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/customer/password":{"x-swagger-router-controller":"customer_api","patch":{"description":"update current customer password","operationId":"changeCustomerPassword","tags":["customer"],"parameters":[{"in":"body","name":"customerData","description":"The user data.","schema":{"type":"object","required":["currentPassword","password"],"properties":{"currentPassword":{"type":"string"},"password":{"type":"string"}}}}],"responses":{"200":{"description":"OK"},"400":{"description":"Bad request"}}}},"/customer/clo/connections":{"x-swagger-router-controller":"customer_connection_api","get":{"description":"Returns customer's CLO connections list","operationId":"getCloConnections","tags":["customer"],"responses":{"200":{"description":"Success","schema":{"type":"object","title":"CLOConnectionInfo","properties":{"customerId":{"type":"string","description":"customer id in the Spaycial repository"},"connections":{"type":"array","title":"Array","items":{"type":"object","description":"object containing credit card details","properties":{"id":{"type":"string"},"type":{"type":"string"},"scheme":{"type":"string"},"programId":{"type":"string"},"metadata":{"type":"object"},"live":{"type":"boolean"},"lastNumbers":{"type":"string"},"firstNumbers":{"type":"string"},"expMonth":{"type":"number"},"expYear":{"type":"number"},"expDate":{"type":"string"},"countryCode":{"type":"string"},"accountId":{"type":"string"}},"required":["id","lastNumbers","expDate","scheme","metadata"],"example":{"created":"2019-10-08T12:30:44.487Z","updated":"2019-10-08T12:30:44.487Z","id":"a83b4b96-568a-49f9-8019-d6fdff41c4c8","type":"visa","scheme":"visa","programId":"4c65afca-047b-4c3e-b079-761545a40e1d","metadata":{"id":"032ad8f4-098a-4187-aed9-5b1c05424df6"},"live":false,"lastNumbers":"4322","firstNumbers":"444400","expYear":2020,"expMonth":2,"expDate":"2020-02-29T23:59:59.999Z","countryCode":"CAN","accountId":"8e8aed10-19ae-4faf-8cd2-147b1d9d1b94"}}}},"required":["customerId","connections"]}},"401":{"description":"Unauthorized access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `expiredToken` - The Authorization header has expired\n* `unauthorized` - The route access is unauthorized\n","enum":["expiredToken","unauthorized"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/customer/creditCard/connections":{"x-swagger-router-controller":"customer_connection_api","post":{"description":"add a credit card connection providing checkout credit card token","operationId":"addCreditCardConnection","tags":["customer"],"parameters":[{"name":"connectionRequest","description":"body containing connection info","schema":{"type":"object","properties":{"creditCardToken":{"type":"string","description":"credit card token (issued by Checkout tokenization)"}},"required":["creditCardToken"]},"in":"body","required":true}],"responses":{"200":{"description":"Success","schema":{"type":"object","properties":{"creditCardId":{"type":"string","description":"the identifier of the credit card created"}},"required":["creditCardId"],"example":{"application/json":[{"creditCardId":"c0b88330-ec05-49c3-99eb-e67b1a1e3fc9"}]}}},"202":{"description":"3DS challenge redirect URL","schema":{"type":"object","properties":{"redirectUrl":{"type":"string","description":"Redirect url to the customer's bank"}},"required":["redirectUrl"]}},"400":{"description":"Bad request","schema":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of bank connection\n* `notFullyRegistered` - Customer not fully registered\n* `creditCardRequired` - Credit Card is required\n* `cardAlreadyLinked` - Credit Card is already linked to the program\n* `errorLinkingCard` - Error while linking card to the program\n* `invalidTokenFormat` - Error while linking card to the program\n","enum":["notFullyRegistered","creditCardRequired","cardAlreadyLinked","errorLinkingCard","invalidTokenFormat"]}}}},"401":{"description":"Unauthorized access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `expiredToken` - The Authorization header has expired\n* `unauthorized` - The route access is unauthorized\n","enum":["expiredToken","unauthorized"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/customer/connections/{connectionId}":{"x-swagger-router-controller":"customer_connection_api","delete":{"description":"delete a connection of any type","operationId":"deleteConnection","tags":["customer"],"parameters":[{"name":"connectionId","in":"path","description":"the connection id (either a bank connection id or a credit card id)","required":true,"type":"string"}],"responses":{"204":{"description":"Success"},"400":{"description":"Bad request","schema":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of bank connection delete\n* `invalidConnectionId` - Invalid connection id\n* `bankConnectionNotFound` - Bank connection not found\n* `customerNotFound` - Customer not found\n* `customerIdMismatch` - Customer id doesn't match\n","enum":["invalidConnectionId","bankConnectionNotFound","customerNotFound","customerIdMismatch"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"401":{"description":"Unauthorized access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `expiredToken` - The Authorization header has expired\n* `unauthorized` - The route access is unauthorized\n","enum":["expiredToken","unauthorized"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/customer/all/connections":{"x-swagger-router-controller":"customer_connection_api","get":{"description":"Returns customer's bank","operationId":"getAllCustomerConnections","tags":["customer"],"responses":{"200":{"description":"Success","schema":{"type":"object","title":"ConnectionInfo","properties":{"customerId":{"type":"string","description":"customer id in the Spaycial repository"},"connections":{"type":"array","title":"Array","items":{"type":"object","title":"Connection","properties":{"id":{"type":"string","description":"the connection id"},"creationDate":{"type":"string","format":"date","description":"creation of the connection, in date-time format of RFC3339"},"type":{"type":"string","description":"type of data provider connection","enum":["CLO","PSD2","SCR"]},"bankId":{"type":"string","description":"bank identifier (as found in GET /banks) (provided only for connections of type PSD2 and SCR)"},"bankName":{"type":"string","description":"bank name (provided only for connections of type PSD2 and SCR)"},"cardType":{"type":"string","description":"type of card associated to this bank (bank vs restaurant )","enum":["bank","restaurant"]},"lastUpdate":{"type":"string","description":"the last time data has been successfuly fetch from the bank by the data provider, in date-time format of RFC3339 (provided only for connections of type PSD2 and SCR)","format":"date"},"passwordError":{"type":"boolean","description":"true if bank password needs to be updated, false otherwise (provided only for connections of type PSD2 and SCR)"},"scheme":{"type":"string","description":"credit card's scheme (provided only for connections of type CLO)"},"lastNumbers":{"type":"string","description":"credit card's last four numbers (provided only for connections of type CLO)"},"expDate":{"type":"string","description":"credit card's expire date (provided only for connections of type CLO)","format":"date"},"countryCode":{"type":"string","description":"credit card's country code ex:\"SE\" (provided only for connections of type CLO)"},"bankActive":{"type":"boolean","description":"false if a bank corresponding to the connection is deactivated (thus resync is not possible at the moment)"}},"required":["id","creationDate","type","cardType"]}}},"required":["customerId","connections"]},"examples":{"application/json":[{"customerId":"ffc09cbd-e5b3-497a-a9d7-9d510810efcb","connections":[{"id":"9d635cb0-07ec-4e90-88f7-2562d5624d05","expDate":"2024-03-31","scheme":"visa","countryCode":"SE","lastNumbers":"5453","type":"CLO"},{"id":"cecb2084-d005-4e04-9689-65af01affc47","creationDate":"2020-03-27T18:15:52+01:00","passwordError":false,"lastUpdate":"2020-03-27","bankId":"connecteur_de_test_fr_b","bankName":"Connecteur de test","cardType":"bank","type":"SCR"}]}]}},"401":{"description":"Unauthorized access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `expiredToken` - The Authorization header has expired\n* `unauthorized` - The route access is unauthorized\n","enum":["expiredToken","unauthorized"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/customer/bank/connections":{"x-swagger-router-controller":"customer_connection_api","get":{"description":"Returns customer's bank connections list","operationId":"getBankConnections","tags":["customer"],"responses":{"200":{"description":"Success","schema":{"type":"object","title":"ConnectionInfo","properties":{"customerId":{"type":"string","description":"customer id in the Spaycial repository"},"connections":{"type":"array","title":"Array","items":{"type":"object","title":"BankConnection","properties":{"id":{"type":"string","description":"bank connection id"},"bankId":{"type":"string","description":"bank identifier (as found in GET /banks)"},"bankName":{"type":"string","description":"bank name"},"cardType":{"type":"string","description":"type of card associated to this bank (bank vs restaurant )","enum":["bank","restaurant"]},"creationDate":{"type":"string","description":"bank connection creation date, in full-date format of RFC3339","format":"date"},"lastUpdate":{"type":"string","description":"the last time data has been successfuly fetch from the bank by the data provider, in date-time format of RFC3339","format":"date"},"passwordError":{"type":"boolean","description":"true if bank password needs to be updated, false otherwise"},"type":{"type":"string","description":"type of connection","enum":["SCR","PSD2"]}},"required":["id","bankId","bankName","creationDate","passwordError"]}}},"required":["customerId","connections"],"example":{"application/json":[{"customerId":"27b36da1-39f2-5ab5-8784-52a78779af58","connections":[{"id":"b6255bf6-b293-424d-9363-d94700aca720","bankId":"0ef0f298-47ab-41f6-ae89-f1f6dab94104","bankName":"Some Bank","creationDate":"2018-01-17"},{"id":"e13c5c09-f71f-4139-869a-3b228109594a","bankId":"63cbd7cc-d65e-4e36-817a-ef3774f2a5ce","bankName":"Another Bank","creationDate":"2018-01-22"}]}]}}},"401":{"description":"Unauthorized access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `expiredToken` - The Authorization header has expired\n* `unauthorized` - The route access is unauthorized\n","enum":["expiredToken","unauthorized"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/customer/bank/connectionCallback":{"x-swagger-router-controller":"customer_connection_api","post":{"description":"add a bank connection to customer by providing bank website callback code","operationId":"addBankConnectionCallback","tags":["customer"],"parameters":[{"name":"connectionRequest","description":"body containing connection info","schema":{"type":"object","properties":{"bankId":{"type":["string","null"],"description":"identifier of the bank to connect with (found in GET /banks)"},"queryString":{"type":"object","description":"object containing the temp code retrieved from psd2 callback login and the customer_id"},"redirectUri":{"type":"string","description":"the URI where to redirect to"}},"required":["queryString"]},"in":"body","required":true}],"responses":{"200":{"description":"Success","schema":{"type":"object","properties":{"bankConnectionId":{"type":"string","description":"the identifier of the bank connection created"}},"required":["bankConnectionId"],"example":{"application/json":[{"bankConnectionId":"c0b88330-ec05-49c3-99eb-e67b1a1e3fc9"}]}}},"400":{"description":"Bad request","schema":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of bank connection\n* `bankNotFound` - Bank not found\n* `bankNotAvailable` - Bank exists but is not available for connection\n* `notFullyRegistered` - Customer not fully registered\n* `credentialsRequired` - Credentials are required\n* `invalidCredentials` - Provided credentials are invalid\n* `actionNeeded` - An action is needed on the bank website\n* `alreadyUsedCredentials` - Credentials already used\n* `providerError` - Failed to create connection with the bank\n* `connectionAlreadyExists` - The customer already have a connection with this bank\n","enum":["bankNotFound","bankNotAvailable","notFullyRegistered","credentialsRequired","invalidCredentials","actionNeeded","alreadyUsedCredentials","creditCardAlreadyConnected","providerError","connectionAlreadyExists"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/auth/bank/verifyDecoupledConnection":{"x-swagger-router-controller":"auth_api","post":{"description":"verify the status of a decoupledConnection and retrieve the oauthcallback uri","operationId":"verifyDecoupledConnection","tags":["auth"],"security":[{"apiKey":[]}],"parameters":[{"name":"verificationRequest","description":"body containing decouple connection info","schema":{"type":"object","properties":{"decoupledDetails":{"type":"object","description":"object containing the decoupledDetails sent from the server to be used for the polling (the specified properties differ depending on the data provider)","properties":{"dataProviderId":{"type":"string"},"dataProviderShortcut":{"type":"string"},"connectionExternalId":{"type":"string"}}}},"required":["decoupledDetails"]},"in":"body","required":true}],"responses":{"200":{"description":"an object containing the oauthcallback and success status","schema":{"type":"object","properties":{"callbackUrl":{"type":"string","description":"the identifier of the bank connection created"},"status":{"type":"string","description":"status of the actual connection ( pending / completed / failed )"}},"example":{"application/json":[{"callbackUrl":"/oauthcallback?code=xxxx&customer_id=xxxxxx","status":"completed"}]}}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"404":{"description":"Account not found","schema":{"type":"object","properties":{"code":{"type":"string","description":"AccountNotFound error\n* `accountNotFound` - The data sent is not valid\n","enum":["accountNotFound"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"422":{"description":"Validation Error","schema":{"type":"object","properties":{"code":{"type":"string","description":"Validation error\n* `validationError` - The data sent is not valid\n","enum":["validationError"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/customer/bank/connections/{connectionId}":{"x-swagger-router-controller":"customer_connection_api","put":{"description":"update a bank connection by providing bank website credentials","operationId":"updateBankConnection","tags":["customer"],"parameters":[{"name":"connectionId","in":"path","description":"the connection id","required":true,"type":"string"},{"name":"connectionUpdateRequest","description":"body containing connection info","schema":{"type":"object","properties":{"credentials":{"type":"object","description":"object containing bank credentials"},"redirectUri":{"type":"string","description":"the URI where to redirect to"},"locale":{"type":"string","description":"for some banks, a locale can be provided to define the bank portal language"},"psuId":{"type":"string","description":"psuId which is the identification number of the user"},"chosenAuthModel":{"type":"string","description":"the chosen authentication model which is redirect or decoupled"}}},"in":"body","required":true}],"responses":{"204":{"description":"Success"},"400":{"description":"Bad request","schema":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of bank connection update\n* `invalidConnectionId` - Invalid connection id\n* `credentialsRequired` - Credentials are required\n* `bankConnectionNotFound` - Bank connection not found\n* `customerNotFound` - Customer not found\n* `invalidCredentials` - Provided credentials are invalid\n* `actionNeeded` - An action is needed on the bank website\n* `ConnectionNotFoundInSe` - Connection Not Found In Salt Edge\n* `bankAlreadyConnected` - Customer has already connected this bank\n* `CustomerIdIsNotAUuid` - Customer is not a valid uuid\n* `bankConnectionAlreadySynchronized` - Bank connection is not in error state, no need to resync because it could spoil active FT connection\n* `providerError` - Failed to create connection with the bank\n","enum":["invalidConnectionId","CustomerIdIsNotAUuid","credentialsRequired","bankConnectionNotFound","customerNotFound","invalidCredentials","actionNeeded","bankAlreadyConnected","ConnectionNotFoundInSe","bankConnectionAlreadySynchronized","providerError"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"401":{"description":"Unauthorized access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `expiredToken` - The Authorization header has expired\n* `unauthorized` - The route access is unauthorized\n","enum":["expiredToken","unauthorized"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}},"delete":{"description":"delete a bank connection","operationId":"deleteBankConnection","tags":["customer"],"parameters":[{"name":"connectionId","in":"path","description":"the connection id","required":true,"type":"string"}],"responses":{"204":{"description":"Success"},"400":{"description":"Bad request","schema":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of bank connection delete\n* `invalidConnectionId` - Invalid connection id\n* `bankConnectionNotFound` - Bank connection not found\n* `customerNotFound` - Customer not found\n","enum":["invalidConnectionId","bankConnectionNotFound","customerNotFound"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"401":{"description":"Unauthorized access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `expiredToken` - The Authorization header has expired\n* `unauthorized` - The route access is unauthorized\n","enum":["expiredToken","unauthorized"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/customer/bank/connectionCallback/{connectionId}":{"x-swagger-router-controller":"customer_connection_api","put":{"description":"update bank connection callback","operationId":"updateBankConnectionCallback","tags":["customer"],"parameters":[{"name":"connectionId","in":"path","description":"the connection id","required":true,"type":"string"},{"name":"connectionRequest","description":"body containing connection info","in":"body","required":true,"schema":{"type":"object","properties":{"queryString":{"type":"object","description":"object containing the query string from interactive callback"}}}}],"responses":{"204":{"description":"Success"},"400":{"description":"Bad request","schema":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of bank connection update\n* `invalidConnectionId` - Invalid connection id\n* `credentialsRequired` - Credentials are required\n* `bankConnectionNotFound` - Bank connection not found\n* `customerNotFound` - Customer not found\n* `invalidCredentials` - Provided credentials are invalid\n* `actionNeeded` - An action is needed on the bank website\n* `ConnectionNotFoundInSe` - Connection Not Found In Salt Edge\n* `bankAlreadyConnected` - Customer has already connected this bank\n* `CustomerIdIsNotAUuid` - Customer is not a valid uuid\n* `bankConnectionAlreadySynchronized` - Bank connection is not in error state, no need to resync because it could spoil active FT connection\n* `providerError` - Failed to create connection with the bank\n","enum":["invalidConnectionId","CustomerIdIsNotAUuid","credentialsRequired","bankConnectionNotFound","customerNotFound","invalidCredentials","actionNeeded","bankAlreadyConnected","ConnectionNotFoundInSe","bankConnectionAlreadySynchronized","providerError"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"401":{"description":"Unauthorized access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `expiredToken` - The Authorization header has expired\n* `unauthorized` - The route access is unauthorized\n","enum":["expiredToken","unauthorized"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/customer/track":{"x-swagger-router-controller":"customer_api","get":{"description":"Track an action made by a Customer","operationId":"trackCustomer","tags":["customer"],"security":[{"apiKey":[]}],"parameters":[{"name":"customerId","in":"query","description":"the customer identifier","required":true,"type":"string"},{"name":"eventName","in":"query","description":"the event name","required":true,"type":"string"},{"name":"value","in":"query","description":"the event value","required":true,"type":"string"}],"responses":{"204":{"description":"Success"},"400":{"description":"Bad request","schema":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of bank connection delete\n* `eventNameNotFound` - Event name was not found\n* `customerNotFound` - Customer not found\n* `invalidCustomerId` - Customer id is not valid\n","enum":["customerNotFound","eventNameNotFound","invalidCustomerId"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"404":{"description":"Not found","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["resourceNotFound"]},"message":{"type":"string","description":"a short error description"}}}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/customer/exists/{externalId}":{"x-swagger-router-controller":"customer_api","get":{"description":"Test if a given external identifier match a customer in the Spaycial repository","operationId":"existsCustomer","tags":["customer"],"security":[{"apiKey":[]}],"parameters":[{"name":"externalId","in":"path","description":"the customer identifier in mall repository","required":true,"type":"string"}],"responses":{"204":{"description":"Success"},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"404":{"description":"Not found","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["resourceNotFound"]},"message":{"type":"string","description":"a short error description"}}}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/customer/isRegistered/{customerId}":{"x-swagger-router-controller":"customer_api","get":{"description":"Test if a given Spaycial identifier matches a registered customer in the Spaycial repository","operationId":"isRegistered","tags":["customer"],"security":[{"apiKey":[]}],"parameters":[{"name":"customerId","in":"path","description":"the customer identifier in the Spaycial repository","required":true,"type":"string"},{"name":"eventType","in":"query","required":true,"type":"string","description":"the event at the origin a call to this endpoint\n* `exclusive_event` - Check member registration to access to an exclusive event\n* `purchase_discount` - Check member registration to apply a purchase discount\n* `store_opening` - Check member registration to access to a new store opening\n* `toilets_access` - Check member registration to access to the toilets\n","enum":["exclusive_event","purchase_discount","store_opening","toilets_access"]}],"responses":{"204":{"description":"Success"},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"404":{"description":"Not found","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["resourceNotFound"]},"message":{"type":"string","description":"a short error description"}}}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/customer/referralExists":{"x-swagger-router-controller":"customer_api","post":{"description":"Test if the given customer info matches a referral customer in the Spaycial database","operationId":"referralExists","tags":["customer"],"security":[{"apiKey":[]}],"parameters":[{"name":"postReferralExistsRequest","description":"the body containing referral information","schema":{"type":"object","properties":{"referralCode":{"type":"string","description":"the customer referral code"},"phoneNumber":{"type":"string","description":"phone number, without any prefix"},"countryCode":{"type":"integer","description":"phone country code (i.e. 33 for France)"}}},"in":"body","required":true}],"responses":{"200":{"description":"Success","schema":{"type":"object","title":"ReferralInfo","properties":{"referralExists":{"type":"boolean","description":"true if referral exists, false otherwhise"},"referralFirstName":{"type":"string","description":"the first name of referral if exists"},"referralNbMonth":{"type":"integer","description":"the referral's number of month since registration (if exists)"}},"required":["referralExists"],"example":{"application/json":[{"referralExists":true}]}}},"400":{"description":"Bad request","schema":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of POST /customer/referralExists\n* `noParameter` - Need to provide either referralCode or phoneNumber + countryCode params\n","enum":["noParameter"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/customer/favoriteAccount":{"x-swagger-router-controller":"customer_api","post":{"description":"set customer's favorite account used for refunds","operationId":"postFavoriteAccount","tags":["customer"],"parameters":[{"name":"favoriteAccount","in":"body","required":true,"schema":{"type":"object","title":"FavoriteAccount","properties":{"iban":{"type":"string","description":"customer favorite bank account to receive refunds (in IBAN format)"},"sortCode":{"type":"string","description":"bank account sort code (specific to the UK bank accounts, instead of the IBAN)"},"accountNumber":{"type":"string","description":"bank account number (specific to the UK bank accounts, instead of the IBAN)"}}}}],"responses":{"204":{"description":"Success"},"400":{"description":"Bad request","schema":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of POST /customer/favoriteAccount\n* `invalidIban` - Invalid iban provided\n* `alreadyUsedIban` - Provided IBAN is already used on another account\n","enum":["invalidIban"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"401":{"description":"Unauthorized access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `expiredToken` - The Authorization header has expired\n* `unauthorized` - The route access is unauthorized\n","enum":["expiredToken","unauthorized"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"404":{"description":"Not found","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["resourceNotFound"]},"message":{"type":"string","description":"a short error description"}}}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}},"get":{"description":"set customer's favorite account used for refunds","operationId":"getCustomerFavoriteAccount","tags":["customer"],"responses":{"200":{"description":"return object with the cashback methods of the customer.","schema":{"type":"object","title":"IbanNumbers","properties":{"IBAN":{"type":"object","description":"IBAN with the first and the last numbers of the customer's IBAN","properties":{"firstNumbers":{"type":"number","description":"first numbers of the customer's iban"},"lastNumbers":{"type":"number","description":"last numbers of the customer's iban"}}},"creditCard":{"type":"object","description":"Credit Card with the last numbers of the customer's credit card","properties":{"lastNumbers":{"type":"number","description":"last number of the customer's credit card"}}},"cashbackFallbackNeeded":{"type":"boolean","description":"Information about the possibility to cashback the customer with the credit card given"}}}},"400":{"description":"Bad request","schema":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of GET /customer/favoriteAccount\n* `invalidIban` - Invalid iban provided\n","enum":["noDefaultIban"]},"message":{"type":"string","description":"a short error description"}}}},"401":{"description":"Unauthorized access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `expiredToken` - The Authorization header has expired\n* `unauthorized` - The route access is unauthorized\n","enum":["expiredToken","unauthorized"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"404":{"description":"Not found","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["resourceNotFound"]},"message":{"type":"string","description":"a short error description"}}}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/customer/wallet":{"x-swagger-router-controller":"customer_api","get":{"description":"get a link to the loyalty card to the user mobile wallet","operationId":"getMobileWalletLink","tags":["customer"],"responses":{"200":{"description":"return object with the cashback methods of the customer.","schema":{"type":"object","title":"Wallet","properties":{"walletURL":{"type":"string","description":"An URL to redirect the user for him/her to add the loyalty card to the mobile wallet"}}}},"401":{"description":"Unauthorized access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `expiredToken` - The Authorization header has expired\n* `unauthorized` - The route access is unauthorized\n","enum":["expiredToken","unauthorized"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"404":{"description":"Not found","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["resourceNotFound"]},"message":{"type":"string","description":"a short error description"}}}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/customer/favoriteAccountLink":{"x-swagger-router-controller":"customer_api","get":{"description":"get an SMS containing a link to allow customer to set its favorite account used for refunds","operationId":"getFavoriteAccountLink","tags":["customer"],"security":[{"apiKey":[]}],"parameters":[{"name":"phoneNumber","type":"string","description":"phone number, without any prefix","in":"header","required":true},{"name":"countryCode","type":"integer","description":"phone country code (i.e. 33 for France)","in":"header","required":true}],"responses":{"204":{"description":"Success"},"400":{"description":"Bad request","schema":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of GET /customer/favoriteAccountLink\n* `no_account` - No account found for this customer\n* `already_sent` - SMS has already been sent few minutes ago\n","enum":["no_account","already_sent"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"404":{"description":"Not found","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["resourceNotFound"]},"message":{"type":"string","description":"a short error description"}}}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/customer/credentialUpdateLink":{"x-swagger-router-controller":"customer_api","get":{"description":"get an SMS containing a link to allow customer to update its bank credentials","operationId":"getCredentialUpdateLink","tags":["customer"],"security":[{"apiKey":[]}],"parameters":[{"name":"phoneNumber","type":"string","description":"phone number, without any prefix","in":"header","required":true},{"name":"countryCode","type":"integer","description":"phone country code (i.e. 33 for France)","in":"header","required":true}],"responses":{"204":{"description":"Success"},"400":{"description":"Bad request","schema":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of GET /customer/credentialUpdateLink\n* `unknown_phone` - Unknown phone number\n* `no_invalid_credentials` - No credential update needed\n* `already_sent` - SMS has already been sent few minutes ago\n","enum":["unknown_phone","no_invalid_credentials","already_sent"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/customer/rewards":{"x-swagger-router-controller":"customer_api","get":{"description":"Returns customer rewards","operationId":"getRewards","tags":["customer"],"responses":{"200":{"description":"Success","schema":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"id of the reward"},"rewardState":{"type":"string","description":"Status of the reward\n* `TRAN` - cashback initiated\n* `PEND` - pending\n* `TERM` - complete\n* `RFND` - cashback validated\n* `CNCL` - gift card cancelled\n* `ERR` - provider error, requires investigation\n","enum":["TRAN","PEND","TERM","RFND","CNCL","ERR"]},"createdAt":{"type":"string","description":"reward date-time of creation","format":"date-time"},"updatedAt":{"type":"string","description":"last update of the reward","format":"date-time"},"rewardValue":{"type":"number","description":"value of the reward"},"redeemed":{"type":"boolean","description":"whether the reward has been redeemed or not (specific to Gift card challenges)"},"redeemDate":{"type":"string","format":"date-time","description":"the date when the reward has been redeemed (specific to Gift card challenges)"},"cashbackId":{"type":"number","description":"the cashback id"},"cashbackStatus":{"type":"number","description":"the cashback id"},"giftcardBarcodeUrl":{"type":"string","description":"SELP barcode URL for the reward when available"},"giftcardPin":{"type":"string","description":"gift card pin for the reward when available"},"challenge":{"type":"object","description":"the challenge associated to this reward","properties":{"id":{"type":"string","description":"id of the challenge"},"name":{"type":"string","description":"name of the challenge"},"teaser":{"type":"string","description":"teaser of the challenge"},"startDate":{"type":"string","description":"the challenge start date","format":"date-time"},"endDate":{"type":"string","description":"the challenge end date","format":"date-time"},"conditionLabel":{"type":"string","description":"the challenge condition label"},"terms":{"type":"string","description":"the challenge terms of service"},"rewardLabel":{"type":"string","description":"the reward label"}}}},"required":["id","rewardState","createdAt","updatedAt"]}}}},"400":{"description":"Bad request","schema":{"type":"object","properties":{"code":{"type":"string","description":"Error of GET /backoffice/customers/{id}/rewards\n * `invalidCustomerId` - Invalid customer id parameter\n","enum":["invalidCustomerId"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"404":{"description":"Not Found","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["resourceNotFound"]},"message":{"type":"string","description":"a short error description"}}}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/customer/stores":{"x-swagger-router-controller":"stores_api","get":{"description":"Returns all stores where the user did (or did not, depending on parameter) make a transaction","operationId":"getStores","tags":["customer"],"parameters":[{"name":"transaction","type":"boolean","in":"query","description":"a boolean set to true if we need stores where user did make a transaction, or false if we need stores where user have not make a transaction yet","required":false}],"responses":{"200":{"description":"A list of stores.","schema":{"type":"array","title":"Array","items":{"type":"object","title":"Store","properties":{"id":{"type":"string","description":"store identifier in shopping hub repository"},"name":{"type":"string","description":"store name"}},"required":["id","name"]}},"examples":{"application/json":[[{"id":"{08228F4D-3FA0-4F1D-AC53-1C13B5E24968}","name":"HISTOIRE D'OR"},{"id":"{78228F4D-4GA0-9C1D-CD53-3B13B5E24968}","name":"ZARA"}]]}},"401":{"description":"Unauthorized access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `expiredToken` - The Authorization header has expired\n* `unauthorized` - The route access is unauthorized\n","enum":["expiredToken","unauthorized"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"404":{"description":"Not found","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["resourceNotFound"]},"message":{"type":"string","description":"a short error description"}}}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/customer/stores/transactions":{"x-swagger-router-controller":"stores_api","get":{"description":"Returns all customer transactions related to shopping hub stores","operationId":"getStoresTransactions","tags":["customer"],"parameters":[{"name":"limit","description":"the maximum number of results to retrieve (default 1000)","type":"number","in":"header","required":false,"minimum":0,"maximum":1000,"default":1000},{"name":"offset","description":"the results offset (default 0), used to paginate results","type":"number","in":"header","required":false,"minimum":0,"default":0},{"name":"from","type":"string","format":"date","in":"header","description":"period start date, in date format of ISO8061","required":false},{"name":"to","type":"string","format":"date","in":"header","description":"period end date, in date format of ISO8061, not possible to add a to without from","required":false}],"responses":{"200":{"description":"A list of transactions.","schema":{"type":"array","title":"Array","items":{"type":"object","title":"Transaction","properties":{"date":{"type":"string","description":"transaction date, in full-date format of RFC3339","format":"date"},"storeId":{"type":"string","description":"the identifier of the store where transaction occurred"},"amount":{"type":"number","description":"transaction amount","format":"float"},"currency":{"type":"string","description":"transaction's currency in ISO_4217 format","minLength":3,"maxLength":3}},"required":["date","storeId","amount","currency"],"example":{"application/json":[{"date":"2016-12-07","storeId":"{08228F4D-3FA0-4F1D-AC53-1C13B5E24968}","amount":-15,"currency":"EUR"},{"date":"2016-12-08","storeId":"{18228F4D-4FA3-4F1D-9C55-DC13B5E24954}","amount":-40.95,"currency":"EUR"}]}}}},"401":{"description":"Unauthorized access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `expiredToken` - The Authorization header has expired\n* `unauthorized` - The route access is unauthorized\n","enum":["expiredToken","unauthorized"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"404":{"description":"Not found","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["resourceNotFound"]},"message":{"type":"string","description":"a short error description"}}}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/customer/points/history":{"x-swagger-router-controller":"points_api","get":{"description":"Returns all customer points history","operationId":"getPointsHistory","tags":["customer"],"parameters":[{"name":"limit","description":"the maximum number of results to retrieve (default 1000)","type":"number","in":"header","required":false,"minimum":0,"maximum":1000,"default":1000},{"name":"offset","description":"the results offset (default 0), used to paginate results","type":"number","in":"header","required":false,"minimum":0,"default":0}],"responses":{"200":{"description":"A list of point history elements","schema":{"type":"array","title":"Array","items":{"type":"object","title":"PointsHistoryElement","properties":{"id":{"type":"string"},"operationDate":{"type":"string","format":"date-time"},"value":{"type":"number"},"type":{"type":"string","enum":["SPEND","EARNED_FROM_TRANSACTION_IN_MALL"]}}}}},"401":{"description":"Unauthorized access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `expiredToken` - The Authorization header has expired\n* `unauthorized` - The route access is unauthorized\n","enum":["expiredToken","unauthorized"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"404":{"description":"Not found","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["resourceNotFound"]},"message":{"type":"string","description":"a short error description"}}}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/customer/stores/transactions/{storeId}":{"x-swagger-router-controller":"stores_api","get":{"description":"Returns all transactions that the user did in the given store","operationId":"getStoreTransactions","tags":["customer"],"parameters":[{"name":"storeId","in":"path","description":"the store identifier in mall repository","required":true,"type":"string"}],"responses":{"200":{"description":"A list of transactions.","schema":{"type":"array","title":"Array","items":{"type":"object","title":"Transaction","properties":{"date":{"type":"string","description":"transaction date, in full-date format of RFC3339","format":"date"},"amount":{"type":"number","description":"transaction amount","format":"float"},"currency":{"type":"string","description":"transaction's currency in ISO_4217 format","minLength":3,"maxLength":3}},"required":["date","amount","currency"]}},"examples":{"application/json":[{"date":"2016-12-07","amount":-15,"currency":"EUR"},{"date":"2016-12-08","amount":-40.95,"currency":"EUR"}]}},"400":{"description":"Bad request","schema":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of GET /stores/transactions/{storeId}\n* `invalidStoreId` - No account found for this customer\n","enum":["invalidStoreId"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"401":{"description":"Unauthorized access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `expiredToken` - The Authorization header has expired\n* `unauthorized` - The route access is unauthorized\n","enum":["expiredToken","unauthorized"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"404":{"description":"Not found","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["resourceNotFound"]},"message":{"type":"string","description":"a short error description"}}}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/customer/services/transactions":{"x-swagger-router-controller":"services_api","get":{"description":"Returns all customer transactions related to shopping hub services","operationId":"getServicesTransactions","tags":["customer"],"responses":{"200":{"description":"A list of transactions.","schema":{"type":"array","title":"Array","items":{"type":"object","title":"Transaction","properties":{"date":{"type":"string","description":"transaction date, in full-date format of RFC3339","format":"date"},"serviceId":{"type":"string","description":"the identifier of the service where transaction occurred"},"amount":{"type":"number","description":"transaction amount","format":"float"},"currency":{"type":"string","description":"transaction's currency in ISO_4217 format","minLength":3,"maxLength":3}},"required":["date","serviceId","amount","currency"]}},"examples":{"application/json":[{"date":"2016-12-07","serviceId":"{28228F4D-3FA0-4F1D-AC53-1C13B5E24968}","amount":-15,"currency":"EUR"},{"date":"2016-12-08","serviceId":"{38228F4D-4FA3-4F1D-9C55-DC13B5E24954}","amount":-40.95,"currency":"EUR"}]}},"401":{"description":"Unauthorized access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `expiredToken` - The Authorization header has expired\n* `unauthorized` - The route access is unauthorized\n","enum":["expiredToken","unauthorized"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"404":{"description":"Not found","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["resourceNotFound"]},"message":{"type":"string","description":"a short error description"}}}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/customer/services/transactions/{serviceId}":{"x-swagger-router-controller":"services_api","get":{"description":"Returns all transactions that the user did for the given service","operationId":"getServiceTransactions","tags":["customer"],"parameters":[{"name":"serviceId","in":"path","description":"the service identifier in mall repository","required":true,"type":"string"}],"responses":{"200":{"description":"A list of transactions.","schema":{"type":"array","title":"Array","items":{"type":"object","title":"Transaction","properties":{"date":{"type":"string","description":"transaction date, in full-date format of RFC3339","format":"date"},"amount":{"type":"number","description":"transaction amount","format":"float"},"currency":{"type":"string","description":"transaction's currency in ISO_4217 format","minLength":3,"maxLength":3}},"required":["date","amount","currency"]}},"examples":{"application/json":[{"date":"2016-12-07","amount":-15,"currency":"EUR"},{"date":"2016-12-08","amount":-40.95,"currency":"EUR"}]}},"400":{"description":"Bad request","schema":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of GET /services/transactions/{serviceId}\n* `invalidServiceId` - serviceId parameter is invalid\n","enum":["invalidServiceId"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"401":{"description":"Unauthorized access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `expiredToken` - The Authorization header has expired\n* `unauthorized` - The route access is unauthorized\n","enum":["expiredToken","unauthorized"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"404":{"description":"Not found","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["resourceNotFound"]},"message":{"type":"string","description":"a short error description"}}}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/customer/transactions/complaint":{"x-swagger-router-controller":"customer_api","get":{"description":"Returns all customer transactions complaints","operationId":"getCustomerComplaints","tags":["customer"],"responses":{"200":{"description":"A list of customer complaints.","schema":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"id of the customer transaction complaint"},"transactionDate":{"type":"string","description":"date of the associated transaction","format":"date"},"attachmentUrl":{"type":"string","description":"url of the complaint attachment"},"amount":{"type":"number","description":"the amount of the transaction"},"claimStatus":{"type":"string","description":"Status of the claim\n* `validated` - complaint was validated\n* `rejected` - complaint was rejected\n* `pending` - complaint is pending\n","enum":["validated","rejected","pending"]},"createdAt":{"type":"string","description":"customer transaction complaint date-time of creation","format":"date-time"},"updatedAt":{"type":"string","description":"last update of the customer transaction complaint","format":"date-time"},"store":{"type":"object","description":"the store associated to this customer transaction complaint","properties":{"id":{"type":"string","description":"id of the store"},"name":{"type":"string","description":"name of the store"}}},"rejectionReason":{"type":"string","description":"Reasons of the claim rejection if the status is rejected\n* `Transaction already associated` - transaction was already associated\n* `Transaction not found` - transaction was not found\n* `The store is out of program` - store is out of the program\n* `Duplicated claim` - complaint is duplicated\n* `Automatically rejected` - automatically rejected\n* `Before registration date` - before registration date\n* `Incomplete ticket` - incomplete ticket\n"},"rejectionReasonTranslationKey":{"type":"string","description":"rejection reason translation key in order to translate it with localisation service"}},"required":["id","transactionDate","createdAt","updatedAt","store"]}}}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"404":{"description":"Not found","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["resourceNotFound"]},"message":{"type":"string","description":"a short error description"}}}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}},"post":{"description":"allows to send a complaint about a transaction assignment issue","operationId":"postTransactionAssignmentComplaint","tags":["customer"],"security":[],"parameters":[{"name":"TransactionComplaintRequest","description":"body containing transaction assignement issue info","schema":{"type":"object","properties":{"storeId":{"type":"string","description":"store identifier"},"externalId":{"type":"string","description":"customer external id"},"amount":{"type":"number","description":"transaction amount","format":"float"},"transactionDate":{"type":"string","description":"transaction date of the transaction assignment request","format":"date"},"additionalFeedback":{"type":"string","description":"additional feeback made by the customer","maxLength":255},"attachment":{"type":"string","description":"Attachment file (base64)"}},"required":["storeId","amount","transactionDate"]},"in":"body","required":true}],"responses":{"204":{"description":"Success"},"400":{"description":"Bad request","schema":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of POST /customer/transactions/complaint\n* `amountRequired` - Need to provide transaction amount parameter\n* `invalidAmount` - Invalid amount parameter\n* `invalidFileType` - Invalid attachment file type\n* `insufficientAmount` - Transaction amount is too low\n* `transactionDateRequired` - Need to provide transaction date parameter\n* `invalidTransactionDate` - Transaction date provided is invalid\n* `storeIdRequired` - Need to provide store id parameter.\n* `invalidStoreId` - Invalid store id parameter\n* `storeNotFound` - Store not found\n* `duplicate` - Same claim already made\n* `transactionDateBeforeRegistration` - Transaction date prior to registration date\n","enum":["storeNotFound","insufficientAmount","invalidFileType","transactionDateBeforeRegistration","amountRequired","duplicate","invalidAmount","transactionDateRequired","invalidTransactionDate","storeIdRequired","invalidStoreId"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"404":{"description":"Not found","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["resourceNotFound"]},"message":{"type":"string","description":"a short error description"}}}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/customer/receipts":{"x-swagger-router-controller":"customer_receipt_api","get":{"description":"get receipts updated by a customer","operationId":"getCustomerReceipts","tags":["customer"],"responses":{"200":{"description":"Success","schema":{"type":"array","items":{"type":"object","title":"Receipt","properties":{"id":{"type":"string","description":"receipt id"},"transactionId":{"type":"string","description":"transaction Id"},"transactionDateTime":{"type":"string","description":"transaction Date time"},"status":{"type":"string","description":"Status of the receipt\n* `validated` - valid receipt\n* `rejected` - invalid receipt\n* `pending` - pending receipt\n","enum":["pending","rejected","validated"]},"receiptImageUrl":{"type":"string","description":"receipt uploaded image url"},"rejectionReason":{"type":"string","description":"Status of the receipt\n* `outOfMall` - out of mall ticket\n* `notATicket` - invalid picture\n* `incomplete` - one of the informations (date, time, amount, store) is missing\n* `notADebit` - not a debit transaction\n* `storeNotFound` - store not present in the list\n* `before_registration` - ticket date is grater than registration date\n* `incomplete-store` - the store is missing\n","enum":["outOfMall","notATicket","incomplete","notADebit","storeNotFound","before_registration","incomplete-store","notInClientReferential"]},"createdAt":{"type":"string","description":"date-time of creation of the receipt","format":"date-time"},"transaction":{"type":"object","description":"the associated transaction object","properties":{"id":{"type":"string","description":"the transaction id"},"transactionDate":{"type":"string","description":"the transaction date"},"amount":{"type":"string","description":"the transction amount"},"currency":{"type":"string","description":"the transaction currency"},"createdAt":{"type":"string","description":"the transaction creation date-time","format":"date-time"},"store":{"type":"object","description":"the store object associated to the transaction","properties":{"id":{"type":"string","description":"the store id"},"name":{"type":"string","description":"the name of the store"}}}}}},"required":["id","status","createdAt"]},"example":{"application/json":[[{"id":"2a804a3a-8da2-4ff1-8077-da588ba53a7d","status":"validated","receiptImageUrl":"https://cdn.transactionconnect.com/claims/staging/88035a54-e6bb-48ae-b526-d6cba060490a","rejectionReason":null,"createdAt":"2020-02-02T16:09:44.034Z","transaction":{"id":"f89c9349-283e-4664-9214-cf8cb702e150","transactionDate":"2020-02-01","amount":"-56.00","currency":"EUR","createdAt":"2020-02-02T16:10:32.743Z","store":{"id":"67322cca-03ad-4542-92b9-2dd20d73fb9f","name":"BASIC FIT"}}},{"id":"7adb2988-6b6e-4f84-8272-2b293af577a8","status":"validated","receiptImageUrl":"https://cdn.transactionconnect.com/claims/staging/88035a54-e6bb-48ae-b526-d6cba060490a","rejectionReason":null,"createdAt":"2020-02-02T17:44:07.552Z","transaction":{"id":"f1eb4c08-0075-4503-befc-3d74d78319a8","transactionDate":"2020-02-01","amount":"-56.00","currency":"EUR","createdAt":"2020-02-02T17:44:40.882Z","store":{"id":"c35cd149-2f80-4f5c-b932-08044c1641c6","name":"GIFI"}}}]]}}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}},"post":{"description":"Allows customer to add a receipt","operationId":"postReceipt","tags":["customer"],"consumes":["multipart/form-data"],"parameters":[{"name":"image","description":"Image of the receipt to upload","in":"formData","required":false,"type":"file"}],"responses":{"200":{"description":"Success","schema":{"type":"object","properties":{"isProperReceiptExtract":{"type":"boolean","description":"true if extracted data contains all essential information we need, false otherwhise"}},"example":{"application/json":[{"isProperReceiptExtract":true}]}}},"400":{"description":"Bad request","schema":{"type":"object","properties":{"code":{"type":"string","description":"Error codes for POST /customer/receipts and POST /auth/receipt\n* `invalidCustomer` - Invalid customer identifier\n* `invalidOptins` - optins parameter is invalid\n* `invalidFileType` - Invalid file type\n* `tooLargeFile` - The provided file is too large\n","enum":["invalidCustomer","invalidOptins","invalidFileType","tooLargeFile"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"401":{"description":"Unauthorized access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `expiredToken` - The Authorization header has expired\n* `unauthorized` - The route access is unauthorized\n","enum":["expiredToken","unauthorized"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"404":{"description":"Not found","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["resourceNotFound"]},"message":{"type":"string","description":"a short error description"}}}},"409":{"description":"Conflict","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["alreadyExists"]},"message":{"type":"string","description":"a short error description"}}}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}},"patch":{"description":"Allows customer to update a receipt","operationId":"updateReceipt","tags":["customer"],"parameters":[{"name":"receiptUpdateRequest","description":"body containing receipt id and store id","schema":{"type":"object","properties":{"storeId":{"type":"string","description":"id of the store"},"receiptId":{"type":"string","description":"id of the receipt"}},"required":["storeId","receiptId"]},"in":"body","required":true}],"responses":{"204":{"description":"Receipt successfully updated"},"400":{"description":"Bad request","schema":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of bank connection update\n* `invalidStoreId` - provided store id is invalid\n","enum":["invalidStoreId"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"401":{"description":"Unauthorized access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `expiredToken` - The Authorization header has expired\n* `unauthorized` - The route access is unauthorized\n","enum":["expiredToken","unauthorized"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"404":{"description":"Not found","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["resourceNotFound"]},"message":{"type":"string","description":"a short error description"}}}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/customer/optins":{"x-swagger-router-controller":"customer_api","get":{"description":"get optins list validated by the customer","operationId":"getCustomerOptins","tags":["customer"],"parameters":[{"name":"lng","type":"string","description":"country code (2 letters) used to filter bank list by country","in":"query","required":false}],"responses":{"200":{"description":"Success","schema":{"type":"array","items":{"type":"object","title":"Optin","properties":{"code":{"type":"string","description":"optin code"},"label":{"type":"string","description":"optin label"},"required":{"type":"boolean","description":"true if optin is required, false otherwise"},"value":{"type":"boolean","description":"true for opt-in, false for opt-out"},"registrationType":{"type":"string","description":"optin type"}},"required":["code","label","required","value","registrationType"]},"example":{"application/json":[[{"code":"optin1","label":"This optin is opted in","value":true,"registrationType":"SCR"},{"code":"optin2","label":"This optin is opted out","value":false,"registrationType":"CLO"}]]}}},"400":{"description":"Bad request","schema":{"type":"object","properties":{"code":{"type":"string","description":"Error codes for GET /customer/optins\n* `invalidLanguage` - invalid language code\n","enum":["invalidLanguage"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}},"put":{"description":"update optins value for current customer","operationId":"updateOptins","tags":["customer"],"parameters":[{"name":"optinsUpdateRequest","description":"body containing new optin values","schema":{"type":"object","properties":{"registrationType":{"type":"string","default":"SCR","description":"type of optin's registration (default 'SCR': web scrapping)"},"optins":{"type":"array","items":{"type":"object","title":"Optin","properties":{"code":{"type":"string","description":"optin code"},"label":{"type":"string","description":"optin code"},"value":{"type":"boolean","description":"true for opt-in, false for opt-out"}},"required":["code","value"]},"example":{"application/json":[[{"code":"optin1","value":true},{"code":"optin2","value":false}]]}}},"required":["optins"]},"in":"body","required":true}],"responses":{"200":{"description":"Success","schema":{"type":"array","items":{"type":"object","title":"Optin","properties":{"code":{"type":"string","description":"optin code"},"value":{"type":"boolean","description":"true for opt-in, false for opt-out"}},"required":["code","value"]}}},"400":{"description":"Bad request","schema":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of bank connection update\n* `invalidOptins` - provided optins are invalid\n","enum":["invalidOptins"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"401":{"description":"Unauthorized access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `expiredToken` - The Authorization header has expired\n* `unauthorized` - The route access is unauthorized\n","enum":["expiredToken","unauthorized"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/country/phoneCountries":{"x-swagger-router-controller":"country_api","get":{"description":"get a list of countries covered by phone communication","operationId":"getPhoneCountries","tags":["country"],"security":[{"apiKey":[]}],"responses":{"200":{"description":"Success","schema":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","description":"country"},"code":{"type":"string","description":"country iso code (2 letters)"}}},"example":{"application/json":[[{"label":"Pologne (Polska)","code":"PL"}]]}}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/challenges":{"x-swagger-router-controller":"challenge_api","get":{"summary":"Returns a list of challenges. The challenges are returned in sorted order, with the most recently created challenge appearing first.","operationId":"getChallenges","tags":["challenges"],"security":[{"apiKey":[]}],"parameters":[{"name":"current","in":"query","type":"boolean","required":false,"description":"If true, only return challenges that are active, if missing, all challenges will be returned."}],"responses":{"200":{"description":"Challenge list","schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"challenge identifier"},"startDate":{"type":"string","description":"challenge start date-time, in full-date format of RFC3339","format":"date-time"},"endDate":{"type":"string","description":"challenge end date-time, in full-date format of RFC3339","format":"date-time"},"name":{"type":"string","description":"name of the challenge"},"teaser":{"type":"string","description":"teaser of the challenge"},"rewardType":{"type":"string","description":"challenge's type"},"rewardLabel":{"type":"string","description":"reward label of the challenge"},"rewardValue":{"type":"string","description":"reward value of the challenge"},"conditionLabel":{"type":"string","description":"condition to unlock the reward"},"legalConditionText":{"type":"string","description":"displayable condition text"},"active":{"type":"boolean","description":"challenge still active or not"},"createdAt":{"type":"string","description":"challenge creation date-time, in date-time format of RFC3339","format":"date-time"}},"required":["id","startDate","endDate","teaser","rewardType","rewardLabel","rewardValue","conditionLabel","createdAt"]}}},"400":{"description":"Bad request","schema":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of challenges API's\n* `invalidShoppingHubId` - Shopping hub identifier is invalid\n","enum":["invalidShoppingHubId"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"401":{"description":"Unauthorized access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `expiredToken` - The Authorization header has expired\n* `unauthorized` - The route access is unauthorized\n","enum":["expiredToken","unauthorized"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/challenge/{id}":{"x-swagger-router-controller":"challenge_api","get":{"summary":"Retrieves the details of an existing challenge.","operationId":"getChallenge","tags":["challenges"],"security":[{"apiKey":[]}],"parameters":[{"name":"id","type":"string","description":"id of the challenge","in":"path","required":true}],"responses":{"200":{"description":"Challenge object","schema":{"type":"object","properties":{"id":{"type":"string","description":"challenge identifier"},"startDate":{"type":"string","description":"challenge start date-time, in full-date format of RFC3339","format":"date-time"},"endDate":{"type":"string","description":"challenge end date-time, in full-date format of RFC3339","format":"date-time"},"name":{"type":"string","description":"name of the challenge"},"teaser":{"type":"string","description":"teaser of the challenge"},"rewardType":{"type":"string","description":"challenge's type"},"rewardLabel":{"type":"string","description":"reward label of the challenge"},"rewardValue":{"type":"string","description":"reward value of the challenge"},"conditionLabel":{"type":"string","description":"condition to unlock the reward"},"legalConditionText":{"type":"string","description":"displayable condition text"},"active":{"type":"boolean","description":"challenge still active or not"},"createdAt":{"type":"string","description":"challenge creation date-time, in date-time format of RFC3339","format":"date-time"}},"required":["id","startDate","endDate","teaser","rewardType","rewardLabel","rewardValue","conditionLabel","createdAt"]}},"400":{"description":"Bad request","schema":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of challenges API's\n* `invalidChallengeId` - Invalid challenge id parameter\n","enum":["invalidChallengeId"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"401":{"description":"Unauthorized access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `expiredToken` - The Authorization header has expired\n* `unauthorized` - The route access is unauthorized\n","enum":["expiredToken","unauthorized"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"404":{"description":"Not found","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["resourceNotFound"]},"message":{"type":"string","description":"a short error description"}}}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/cashback":{"x-swagger-router-controller":"cashback/cashback_api","post":{"description":"generate a cashback refund for a given customer","operationId":"postCashback","tags":["cashback"],"security":[{"apiKey":[],"signature":[]}],"parameters":[{"name":"Expires-at","type":"integer","description":"request expiration time as a UNIX timestamp in UTC timezone. We suggest to use +1 minute from the current time.","in":"header"},{"name":"cashBackRequest","description":"body containing cahsback info","schema":{"type":"object","properties":{"customerId":{"type":"string","description":"customer identifier in the Spaycial database"},"customerExternalId":{"type":"string","description":"the customer external id"},"externalId":{"type":"string","description":"the cashback external id (an optional reference of the cashback in your system)"},"ownerInfo":{"type":"object","description":"information about bank account owner","properties":{"firstName":{"type":"string","description":"The owner's first name"},"lastName":{"type":"string","description":"The owner's last name"},"birthDate":{"type":"string","description":"The owner's birth date, in full-date format of RFC3339","format":"date"},"email":{"type":"string","description":"The owner's email address - must be a valid email"},"nationality":{"type":"string","description":"The owner’s nationality. ISO 3166-1 alpha-2 format is expected","maxLength":2},"address":{"type":"object","description":"The owner's address","properties":{"addressLine1":{"type":"string","description":"The first line of the address"},"addressLine2":{"type":"string","description":"The second line of the address"},"city":{"type":"string","description":"The city of the address"},"region":{"type":"string","description":"The region of the address - this is optional except if the Country is US, CA or MX"},"postalCode":{"type":"string","description":"The postal code of the address - can be alphanumeric, dashes or spaces"},"country":{"type":"string","description":"The country code of the address - ISO 3166-1 alpha-2 format is expected","maxLength":2}},"required":["addressLine1","city","postalCode","country"]}},"required":["firstName","lastName","email"]},"transferInfo":{"type":"object","description":"information about the transfer to create","properties":{"iban":{"type":"string","description":"The IBAN of the bank account where the money need to be transferred - if not set, an automatic search of customer's IBAN will be done."},"amount":{"type":"integer","description":"an amount of money in the smallest sub-division of the currency, e.g. 12.60 EUR would be represented as 1260 whereas 12 JPY would be represented as just 12)"},"currency":{"type":"string","description":"transaction's currency in ISO_4217 format","minLength":3,"maxLength":3},"bankReference":{"type":"string","description":"A custom reference you wish to appear on the customer’s bank statement. This reference can contain max 12 characters","maxLength":12},"cashbackType":{"type":"string","description":"Cashback type\n* `standard` - Standard cashback (default value)\n* `parking` - Cashback matching a parking reward\n","enum":["standard","parking"]}},"required":["amount","currency"]}},"required":["ownerInfo","transferInfo"]},"in":"body","required":true}],"responses":{"200":{"description":"Success","schema":{"type":"object","title":"CashBackResponse","properties":{"transferId":{"type":"string","description":"The identifier of the transfer"}},"required":["transferId"],"example":{"application/json":[{"transferId":"8494514"}]}}},"400":{"description":"Bad request","schema":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of POST /cashback\n* `invalidCustomer` - Invalid customer id\n* `invalidApiKeyHeader` - Invalid Api-Key header\n* `incompleteRegistration` - Customer must complete registration\n* `cashbackUnavailable` - Cashback has not been activated for this program\n* `invalidEmail` - Email is invalid\n* `invalidBirthDate` - Birth date provided is invalid\n* `invalidNationality` - Nationality provided is invalid. ISO 3166-1 alpha-2 format is expected.\n* `invalidAddress` - Address provided is invalid\n* `invalidIban` - Invalid iban provided\n* `noDefaultIban` - No default IBAN found for this customer\n* `invalidAmount` - The given amount is invalid\n* `invalidCurrency` - The given currency is invalid\n* `invalidBankReference` - The given bankReference is invalid\n* `cashbackFailed` - The Cashback transfer failed\n* `customerNotConnected` - The customer is not connected to the cashback provider\n","enum":["invalidCustomer","invalidApiKeyHeader","incompleteRegistration","cashbackUnavailable","invalidEmail","invalidBirthDate","invalidNationality","invalidAddress","invalidIban","noDefaultIban","invalidAmount","invalidCurrency","invalidBankReference","cashbackFailed","customerNotConnected"]},"message":{"type":"string","description":"a short error description"},"transferErrorCode":{"type":"string","description":"An error code, set when the code is 'cashbackFailed'\n* `insufficientWalletBalance` - Insufficient wallet balance\n* `fraudPolicy` - Refused due to the Fraud Policy\n* `kyc` - The KYC limits for the customer have been reached\n* `other` - The cashback was refused due to another reason\n","enum":["insufficientWalletBalance","fraudDetected","kyc","other"]},"statusCode":{"type":"number","description":"http error code"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"404":{"description":"Not found","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["resourceNotFound"]},"message":{"type":"string","description":"a short error description"}}}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/cashback/list":{"x-swagger-router-controller":"cashback/cashback_api","post":{"description":"generate a list of cashback refund","operationId":"postCashbackList","tags":["cashback"],"security":[{"apiKey":[],"signature":[]}],"parameters":[{"name":"Expires-at","type":"integer","description":"request expiration time as a UNIX timestamp in UTC timezone. We suggest to use +1 minute from the current time.","in":"header"},{"name":"cashBackListRequest","description":"body containing an array of cahsbacks info","schema":{"type":"array","items":{"type":"object","properties":{"customerId":{"type":"string","description":"customer identifier in the Spaycial database"},"customerExternalId":{"type":"string","description":"the customer external id"},"externalId":{"type":"string","description":"the cashback external id (an optional reference of the cashback in your system)"},"ownerInfo":{"type":"object","description":"information about bank account owner","properties":{"firstName":{"type":"string","description":"The owner's first name"},"lastName":{"type":"string","description":"The owner's last name"},"birthDate":{"type":"string","description":"The owner's birth date, in full-date format of RFC3339","format":"date"},"email":{"type":"string","description":"The owner's email address - must be a valid email"},"nationality":{"type":"string","description":"The owner’s nationality. ISO 3166-1 alpha-2 format is expected","maxLength":2},"address":{"type":"object","description":"The owner's address","properties":{"addressLine1":{"type":"string","description":"The first line of the address"},"addressLine2":{"type":"string","description":"The second line of the address"},"city":{"type":"string","description":"The city of the address"},"region":{"type":"string","description":"The region of the address - this is optional except if the Country is US, CA or MX"},"postalCode":{"type":"string","description":"The postal code of the address - can be alphanumeric, dashes or spaces"},"country":{"type":"string","description":"The country code of the address - ISO 3166-1 alpha-2 format is expected","maxLength":2}},"required":["addressLine1","city","postalCode","country"]}},"required":["firstName","lastName","email"]},"transferInfo":{"type":"object","description":"information about the transfer to create","properties":{"iban":{"type":"string","description":"The IBAN of the bank account where the money need to be transferred - if not set, an automatic search of customer's IBAN will be done."},"amount":{"type":"integer","description":"an amount of money in the smallest sub-division of the currency, e.g. 12.60 EUR would be represented as 1260 whereas 12 JPY would be represented as just 12)"},"currency":{"type":"string","description":"transaction's currency in ISO_4217 format","minLength":3,"maxLength":3},"bankReference":{"type":"string","description":"A custom reference you wish to appear on the customer’s bank statement. This reference can contain max 12 characters","maxLength":12},"cashbackType":{"type":"string","description":"Cashback type\n* `standard` - Standard cashback (default value)\n* `parking` - Cashback matching a parking reward\n","enum":["standard","parking"]}},"required":["amount","currency"]}},"required":["ownerInfo","transferInfo"]},"minItems":1,"maxItems":200},"in":"body","required":true}],"responses":{"200":{"description":"Success","schema":{"type":"array","items":{"type":"object","title":"CashBackResponse","properties":{"transferId":{"type":"string","description":"The identifier of the transfer"}},"required":["transferId"],"example":{"application/json":[{"transferId":"8494514"}]}},"example":{"application/json":[[{"transferId":"8494514"},{"status":"ERROR","code":"invalidCustomer","message":"Invalid customer id","statusCode":400}]]}}},"400":{"description":"Bad request","schema":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of POST /cashback\n* `invalidApiKeyHeader` - Invalid Api-Key header\n","enum":["invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"},"transferErrorCode":{"type":"string","description":"An error code, set when the code is 'cashbackFailed'\n* `insufficientWalletBalance` - Insufficient wallet balance\n* `fraudPolicy` - Refused due to the Fraud Policy\n* `kyc` - The KYC limits for the customer have been reached\n* `other` - The cashback was refused due to another reason\n","enum":["insufficientWalletBalance","fraudDetected","kyc","other"]}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"404":{"description":"Not found","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["resourceNotFound"]},"message":{"type":"string","description":"a short error description"}}}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/cashbacks/pushedToHub":{"x-swagger-router-controller":"cashback/cashback_api","get":{"description":"Return a list of cashbacks that have been pushed to hub in a given period (30 days max)","operationId":"getPushedCashbacks","tags":["cashback"],"security":[{"signature":[],"apiKey":[]}],"parameters":[{"name":"startDate","type":"string","format":"date","in":"header","description":"period start date, in full-date format of RFC3339","required":true},{"name":"endDate","type":"string","format":"date","in":"header","description":"period end date, in full-date format of RFC3339","required":true},{"name":"limit","description":"the maximum number of results to retrieve (default 1000)","type":"number","in":"header","required":false},{"name":"offset","description":"the results offset (default 0), used to paginate results","type":"number","in":"header","required":false}],"responses":{"200":{"description":"Success","schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"identifier of the cashback"},"intermediateStatus":{"type":"string","description":"intermediate state of the cashback","enum":["SUCCEEDED","FAILED"]},"intermediateStatusDate":{"type":"string","description":"intermediate state was pushed to hub date","format":"date"},"finalStatus":{"type":"string","description":"final state of the cashback","enum":["RECEIVED","REJECTED"]},"finalStatusDate":{"type":"string","description":"final state was pushed to hub date","format":"date"}}},"example":{"application/json":[[{"id":"234123","intermediateStatus":"SUCCEEDED","intermediateStatusDate":"2017-01-09","finalStatus":"RECEIVED","finalStatusDate":"2017-01-09"}]]}}},"400":{"description":"Bad request","schema":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of GET /cashbacks/pushedToHub\n* `invalidPeriod` - Invalid startDate or endDate\n","enum":["invalidPeriod"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"500":{"description":"Server Error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/admin/customers":{"x-swagger-router-controller":"admin_api","get":{"description":"Return a list of customers that have registered in a given period","operationId":"getCustomers","tags":["admin"],"security":[{"signature":[],"apiKey":[]}],"parameters":[{"name":"startDate","type":"string","format":"date","in":"header","description":"period start date, in full-date format of RFC3339","required":true},{"name":"endDate","type":"string","format":"date","in":"header","description":"period end date, in full-date format of RFC3339","required":true},{"name":"limit","description":"the maximum number of results to retrieve (default 1000)","type":"number","in":"header","required":false},{"name":"offset","description":"the results offset (default 0), used to paginate results","type":"number","in":"header","required":false}],"responses":{"200":{"description":"Success","schema":{"type":"array","items":{"type":"object","properties":{"customerId":{"type":"string","description":"identifier of the customer"},"externalId":{"type":"string","description":"external identifier of the customer"},"registrationDate":{"type":"string","description":"customer's registration date","format":"date"},"registrationType":{"type":"string","description":"type of the registration","enum":["receipt","bank"]}}},"example":{"application/json":[[{"customerId":"0e67d4d5-e11d-4766-966c-d3d15b2acfb6","customerExternalId":"56591974","registrationDate":"2019-04-30T06:09:35.309Z","registrationType":"BANK"}]]}}},"400":{"description":"Bad request","schema":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of GET /admin/customers\n* `invalidPeriod` - Invalid startDate or endDate\n","enum":["invalidPeriod"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"500":{"description":"Server Error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/admin/customer":{"x-swagger-router-controller":"admin_api","delete":{"description":"Delete a customer in the Spaycial repository (based on customerId)","operationId":"deleteCustomerAdmin","tags":["admin"],"security":[{"signature":[],"apiKey":[]}],"parameters":[{"name":"customerId","in":"header","required":true,"type":"string","description":"identifier of the customer to delete"}],"responses":{"204":{"description":"Success"},"401":{"description":"Unauthorized access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `expiredToken` - The Authorization header has expired\n* `unauthorized` - The route access is unauthorized\n","enum":["expiredToken","unauthorized"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"404":{"description":"Not found","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["resourceNotFound"]},"message":{"type":"string","description":"a short error description"}}}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/admin/customer/bank/connections/{connectionId}":{"x-swagger-router-controller":"admin_api","patch":{"description":"update a bank connection","operationId":"patchBankConnection","tags":["customer"],"security":[{"signature":[],"apiKey":[]}],"parameters":[{"name":"connectionId","in":"path","description":"the connection id to update","required":true,"type":"string"},{"name":"connectionUpdateRequest","description":"body containing connection info","schema":{"type":"object","properties":{"simulateInvalidCredentials":{"type":"boolean","description":"true to simulate an invalidCredentials error on this bank connection, false to do nothing"}}},"in":"body","required":true}],"responses":{"204":{"description":"Success"},"400":{"description":"Bad request","schema":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of bank connection update\n* `invalidConnectionId` - Invalid bank connection id\n","enum":["invalidConnectionId"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"401":{"description":"Unauthorized access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `expiredToken` - The Authorization header has expired\n* `unauthorized` - The route access is unauthorized\n","enum":["expiredToken","unauthorized"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"404":{"description":"Not found","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["resourceNotFound"]},"message":{"type":"string","description":"a short error description"}}}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/admin/customerRecommendations":{"x-swagger-router-controller":"admin_api","post":{"description":"Retrieve recommendation for customers - 3 retailers ID for each customers based on previous customers transactions. It's a list of retailers where user haven't spent anything yet but it's likely he will. If there are no  personal recommendations for a customer (no transactions made by the customer yet) 3 general recommendations would be provided","operationId":"getCustomerRecommendations","tags":["admin"],"security":[{"signature":[],"apiKey":[]}],"parameters":[{"name":"customerRecommendationsRequest","description":"body containing customers filters","schema":{"type":"object","properties":{"customers":{"description":"a list of customers external ids","type":"array","items":{"type":"string"}},"dataRetrievalMethod":{"description":"filter users based on the way we collect their data.\nCodes:\n* `paymentCard` - filter users who joined the program by linking their payment card\n* `scan` - filter users who manually scan of their purchase receipt as part of the program\n","type":"string","enum":["paymentCard","scan"]},"status":{"description":"whether users bank connections are synchronized or desynchronized. If a user has multiple bank connections, he will be counted as desynchronised if one of his bank connections is desynchronised","type":"string","enum":["synchronized","desynchronized"]},"registered":{"description":"true for users who has finished registration in the system, false for those who are not yet finished the registration process.","type":"boolean"}}},"in":"body","required":true}],"responses":{"200":{"description":"Success","schema":{"type":"array","items":{"type":"object","properties":{"customerId":{"type":"string","description":"customer external id"},"retailers":{"description":"A list of recommended retailers ids","type":"array","items":{"type":"string","description":"retailer id"}}}}}},"400":{"description":"Bad request","schema":{"type":"object","properties":{"code":{"type":"string","description":"error code"},"message":{"type":"string","description":"a short error description"}}}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/admin/webhook/customerTransactions":{"x-swagger-router-controller":"admin_api","post":{"description":"trigger a customer_transactions webhook on a shopping hub","operationId":"sendCustomerTransactionsWebhook","tags":["admin"],"security":[{"apiKey":[]}],"parameters":[{"name":"customerTransactionsData","description":"The data describing the customer_transactions webhook requested","schema":{"type":"object","properties":{"minTransactions":{"type":"integer","description":"Minimum number of generated transactions (inclusive)","default":3,"minimum":1},"maxTransactions":{"type":"integer","description":"Maximum number of generated transactions (inclusive)","default":3,"minimum":1},"customersExternalIds":{"type":"array","description":"List of external customer identifiers used randomly in generated transactions","minItems":1,"items":{"type":"string"}},"purchaseLocationsExternalIds":{"type":"array","description":"List of purchase locations external identifiers used randomly in generated transactions","minItems":1,"items":{"type":"string"}},"currency":{"type":"string","description":"Transactions currency in ISO_4217 format","minLength":3,"maxLength":3,"default":"EUR"}},"required":["customersExternalIds","purchaseLocationsExternalIds"]},"in":"body","required":true}],"responses":{"200":{"description":"Success","schema":{"type":"object","properties":{"configuredEndpoints":{"type":"integer","minimum":0,"description":"Number of endpoint configured"},"successCalls":{"type":"integer","minimum":0,"description":"Number of successful endpoint call"},"failedCalls":{"type":"integer","minimum":0,"description":"Number of failed endpoint call"}},"required":["configuredEndpoints","successCalls","failedCalls"]}},"400":{"description":"Bad request, no endpoint registered","schema":{"type":"object","properties":{"code":{"type":"string","description":"Bad webhook registration\n* `noEndpointRegistered` - There is no endpoint registered for this shopping hub\n","enum":["noEndpointRegistered"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/admin/webhook/bankConnectionsUpdateV2":{"x-swagger-router-controller":"admin_api","post":{"description":"trigger a bank_connections_update_v2 webhook on a shopping hub","operationId":"sendBankConnectionsUpdateV2Webhook","tags":["admin"],"security":[{"apiKey":[]}],"parameters":[{"name":"bankConnectionsUpdateV2Data","description":"The data describing the bank_connections_update_v2 webhook requested","schema":{"type":"object","properties":{"eventType":{"type":"string","description":"Type of event between create, update or delete","enum":["create","update","delete"]},"customerExternalId":{"type":"string","description":"The client's customer id"},"connectionId":{"type":"string","description":"The Spaycial's bank connection id, generated if not specified"},"errorCode":{"type":"string","description":"The error code from the data provider","enum":["psd2ConnectionInvalid","psd2ConnectionExpired","invalidCredentials"]},"bank":{"type":"string","description":"The bank name of the bank connection","default":"Boursorama"},"accounts":{"type":"array","description":"Optional list of bank accounts to include on the connection (id and accountHash per account, for joint-account testing)","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Spaycial bank account id"},"accountHash":{"type":"string","description":"Opaque hash of the account IBAN (nullable)"}}}}},"required":["eventType","customerExternalId"]},"in":"body","required":true}],"responses":{"200":{"description":"Success","schema":{"type":"object","properties":{"configuredEndpoints":{"type":"integer","minimum":0,"description":"Number of endpoint configured"},"successCalls":{"type":"integer","minimum":0,"description":"Number of successful endpoint call"},"failedCalls":{"type":"integer","minimum":0,"description":"Number of failed endpoint call"}},"required":["configuredEndpoints","successCalls","failedCalls"]}},"400":{"description":"Bad request, no endpoint registered","schema":{"type":"object","properties":{"code":{"type":"string","description":"Bad webhook registration\n* `noEndpointRegistered` - There is no endpoint registered for this shopping hub\n","enum":["noEndpointRegistered"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/testimonies/random":{"x-swagger-router-controller":"testimonies_api","get":{"description":"get three random testimonies, one of each categories","operationId":"getRandomTestimonies","tags":["testimonies"],"security":[{"apiKey":[]}],"parameters":[{"name":"lng","type":"string","description":"country code (2 letters) used to filter testimonies","in":"query","minLength":2,"maxLength":2,"required":true}],"responses":{"200":{"description":"Success","schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"identifier of the testimony"},"age":{"type":"integer","description":"interviewed person's age"},"description":{"type":"string","description":"Testimony's description"},"firstName":{"type":"string","description":"Interviewed person's first name"},"category":{"type":"string","description":"Testimony's category"}}},"example":{"application/json":[[{"id":"41c65e84-e30b-4f79-8f2a-92fe42c034de","birthDate":"1984-10-09","category":"benefits","description":"This is a benefits test testimony, it should be disabled and not display.","firstName":"Transaction","age":35}]]}}},"400":{"description":"Bad request","schema":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of get random testimonies\n* `invalidLanguage` - invalid language code\n","enum":["invalidLanguage"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"403":{"description":"Forbidden access","schema":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"500":{"description":"Server error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}},"/transactions/pushedToHub":{"x-swagger-router-controller":"transactions_api","get":{"description":"Return a list of transactions that have been pushed to hub in a given period (30 days max)","operationId":"getPushedTransactions","tags":["transaction"],"security":[{"signature":[],"apiKey":[]}],"parameters":[{"name":"startDate","type":"string","format":"date","in":"header","description":"period start date, in full-date format of RFC3339","required":true},{"name":"endDate","type":"string","format":"date","in":"header","description":"period end date, in full-date format of RFC3339","required":true},{"name":"limit","description":"the maximum number of results to retrieve (default 1000)","type":"number","in":"header","required":false},{"name":"offset","description":"the results offset (default 0), used to paginate results","type":"number","in":"header","required":false}],"responses":{"200":{"description":"Success","schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"identifier of the transaction"},"amount":{"type":"number","description":"transaction amount","format":"float"}}},"example":{"application/json":[[{"id":"3275ffc5-f1dd-435e-8757-1d293ff1e832","amount":"-40.17"}]]}}},"400":{"description":"Bad request","schema":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of GET /transactions/pushedToHub\n* `invalidPeriod` - Invalid startDate or endDate\n","enum":["invalidPeriod"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]}},"500":{"description":"Server Error","schema":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}}}}}}},"definitions":{"ForbiddenRequest":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `missingAuthorizationHeader` - The Authorization header was not found\n* `invalidAuthorizationHeader` - The Authorization header is not valid\n* `missingApiKeyHeader` - The Api-Key header was not found\n* `invalidApiKeyHeader` - The Api-Key header is not valid\n* `missingExpiresAtHeader` - The Expires-at header was not found\n* `invalidExpiresAtHeader` - The Expires-at header is not valid\n","enum":["missingAuthorizationHeader","invalidAuthorizationHeader","missingApiKeyHeader","invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"ValidationError":{"type":"object","properties":{"code":{"type":"string","description":"Validation error\n* `validationError` - The data sent is not valid\n","enum":["validationError"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"BadWebhookRegistration":{"type":"object","properties":{"code":{"type":"string","description":"Bad webhook registration\n* `noEndpointRegistered` - There is no endpoint registered for this shopping hub\n","enum":["noEndpointRegistered"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"GetBOProviderTransactionsError":{"type":"object","properties":{"code":{"type":"string","description":"AccountNotFound error\n* `invalidAccountId` - Invalid account id\n* `accountNotFound` - No account found with this id\n* `unsupportedProvider` - Data provider currently not supported\n","enum":["accountNotFound"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"AccountNotFoundError":{"type":"object","properties":{"code":{"type":"string","description":"AccountNotFound error\n* `accountNotFound` - The data sent is not valid\n","enum":["accountNotFound"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"PostModelEntityError":{"type":"object","properties":{"code":{"type":"string","description":"* `invalidEntity` - The entity sent is not valid\n","enum":["invalidEntity"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"GetBackOfficeEntityByIdError":{"type":"object","properties":{"code":{"type":"string","description":"* `invalidEntity` - The entity sent is not valid\n* `invalidFilters` - The filter sent is not valid\n","enum":["invalidEntity","invalidFilters"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"GetBackOfficeEntityListError":{"type":"object","properties":{"code":{"type":"string","description":"* `invalidEntity` - The entity sent is not valid\n* `invalidFilters` - The filter sent is not valid\n","enum":["invalidEntity","invalidFilters"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"UnauthorizedRequest":{"type":"object","properties":{"code":{"type":"string","description":"Unauthorized request\n* `expiredToken` - The Authorization header has expired\n* `unauthorized` - The route access is unauthorized\n","enum":["expiredToken","unauthorized"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"InternalServerError":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["internalServerError"]},"message":{"type":"string","description":"a short error description"}}},"BadGetaway":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["badGetaway"]},"message":{"type":"string","description":"a short error description"}}},"ResourceNotFound":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["resourceNotFound"]},"message":{"type":"string","description":"a short error description"}}},"Conflict":{"required":["code","message"],"properties":{"code":{"type":"string","description":"a code describing the error","enum":["alreadyExists"]},"message":{"type":"string","description":"a short error description"}}},"Settings":{"type":"object","required":["b2cFrontEnd"],"properties":{"b2cFrontEnd":{"type":"object","required":["domainSuffix"],"properties":{"domainSuffix":{"type":"string","description":"Suffix used in shopping hub's domain"}}}}},"GetBanksResponse":{"type":"array","items":{"type":"object","title":"Bank","properties":{"id":{"type":"string","description":"bank id in data provider's repository"},"name":{"type":"string","description":"bank name"},"countryCode":{"type":"string","description":"country code of the bank"},"available":{"type":"boolean","description":"true if the bank is available for connection, false otherwise (use to make teasing on future banks)"},"interactive":{"type":"boolean","description":"true if the bank requires user interaction, false otherwise"},"cardType":{"type":"string","description":"type of card associated to this bank (bank vs restaurant )","enum":["bank","restaurant"]},"logoUrl":{"type":"string","description":"url of bank logo"},"type":{"type":"string","description":"type of data provider connection","enum":["PSD2","SCR"]}},"required":["id","name","countryCode","cardType"]},"example":{"application/json":[[{"id":"d9a25c93-bda9-4253-a49b-45f2a0979847","name":"A French Bank","countryCode":"FR","available":true,"cardType":"bank","logoUrl":"http://logo.com/frenchbank.png"},{"id":"4adb3a28-81e3-4e76-9a7f-ec59870b4893","name":"Rest DE","countryCode":"DE","available":false,"cardType":"rest","logoUrl":"http://logo.com/rest.png"}]]}},"GetBanksError":{"type":"object","properties":{"code":{"type":"string","description":"Error codes for GET /banks\n* `invalidCountry` - Country parameter is invalid. Need to be 2 letters ISO code. Multiple countries seperated with comma.\n","enum":["invalidCountry"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"getTestAccountsResponse":{"type":"object","items":{"type":"object","title":"RegistrationApiResult","properties":{"success":{"type":"boolean","description":"success flag"}}}},"getTestAccountsError":{"type":"object","properties":{"code":{"type":"string","description":"error code"},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"GetBOInformationError":{"type":"object","properties":{"code":{"type":"string","description":"Error of GET /backoffice/customers/{id}\n * `invalidCustomerId` - Invalid customer id parameter\n","enum":["invalidCustomerId"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"GetRewardsError":{"type":"object","properties":{"code":{"type":"string","description":"Error of GET /backoffice/customers/{id}/rewards\n * `invalidCustomerId` - Invalid customer id parameter\n","enum":["invalidCustomerId"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"GetBOBankConnectionsError":{"type":"object","properties":{"code":{"type":"string","description":"Error of GET /backoffice/customers/{id}/bankConnections\n* `invalidCustomerId` - Invalid customer id parameter\n","enum":["invalidCustomerId"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"GetBankByIdResponse":{"type":"object","title":"Bank","properties":{"id":{"type":"string","description":"bank id in data provider's repository"},"name":{"type":"string","description":"bank name"},"countryCode":{"type":"string","description":"country code of the bank"},"available":{"type":"boolean","description":"true if the bank is available for connection, false otherwise (use to make teasing on future banks)"},"cardType":{"type":"string","description":"type of card associated to this bank (bank vs restaurant )","enum":["bank","restaurant"]},"type":{"type":"string","description":"type of data provider connection - CLO, PSD2, SCR","enum":["CLO","PSD2","SCR"]},"logoUrl":{"type":"string","description":"url of bank logo"},"authorizeURL":{"type":"string","description":"authorize url for the connection"},"dataProviderConnectionId":{"type":"string","description":"used by data provider to identify bank connection"},"decoupledDetails":{"type":"object","description":"if the connection is decoupled the details to resend to the back for verification are put here"},"fields":{"type":"array","title":"Array","description":"fields to fill (credentials) in order to connect to this bank","items":{"type":"object","title":"BankField","properties":{"name":{"type":"string","description":"name of the field (key to use when submitting field)"},"label":{"type":"string","description":"label of the field, to use for display"},"type":{"type":"string","enum":["text","password","select","date"],"description":"field input type"},"values":{"type":"array","title":"Array","description":"field options when field type is 'select'","items":{"type":"object","title":"BankSelectOptionValue","properties":{"value":{"type":"string","description":"value of the select item (to use when submitting field)"},"label":{"type":"string","description":"label of the select item, to use for display"}},"required":["value","label"]}},"required":{"type":"boolean","description":"true if the bank is field is required on bank connection update, false otherwise"},"requiredForUpdate":{"type":"boolean","description":"true if the bank is field is required on bank connection update, false otherwise"},"regex":{"type":"string"}},"required":["name","label","type","required","requiredForUpdate","regex"]}}},"required":["id","name","countryCode","cardType","available","fields"],"example":{"application/json":[{"id":"d9a25c93-bda9-4253-a49b-45f2a0979847","name":"A French Bank","countryCode":"FR","logoUrl":"http://www.example.com/logo-fb.png","cardType":"bank","available":true,"fields":[{"regex":null,"type":"text","name":"login","label":"Identifiant","required":true,"requiredForUpdate":false},{"regex":null,"type":"password","name":"password","label":"Mot de passe","required":true,"requiredForUpdate":true}]}]}},"GetBankByIdError":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of GET /banks/:bankId\n* `invalidBankId` - Invalid bankId parameter\n* `bankNotFound` - Bank not found\n* `bankNotAvailable` - Bank not available for connection\n* `redirectURIRequired` - redirectURI is required for PSD2 bank\n* `invalidRedirectURI` - redirectURI is not valid\n* `bankNotFound` - Bank shortcut not exist in db\n","enum":["invalidBankId","bankNotAvailable","redirectURIRequired","invalidRedirectURI","bankNotFound"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"GetHubByIdError":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of GET /shoppingHubsByHost\n* `invalidHuost` - Invalid host parameter\n","enum":["invalidUUIDShoppingHubId"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"GetShoppingHubOwnersResponse":{"type":"array","items":{"type":"object","title":"ShoppingHubOwner","properties":{"id":{"type":"string","description":"THe Shopping Hub Owner id"},"name":{"type":"string","description":"THe Shopping Hub Owner name"}}}},"PostShoppingHubOwnerError":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of POST backoffice/shoppingHubOwner\n* `missingHubName` - Missing hubName parameter\n* `nameAlreadyUsed` - Given name is already used by another shopping hub owner\n","enum":["missingHubName","nameAlreadyUsed"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"PostShoppingHubOwnerResponse":{"type":"object","title":"ShoppingHubOwner","properties":{"id":{"type":"string","description":"THe Shopping Hub Owner id"},"name":{"type":"string","description":"THe Shopping Hub Owner name"}}},"GetOptinsResponse":{"type":"array","items":{"type":"object","title":"Optin","properties":{"code":{"type":"string","description":"optin code"},"label":{"type":"string","description":"optin label"},"headerTranslationKey":{"type":"string","description":"optin header label key optional"},"required":{"type":"boolean","description":"true if optin is mandatory, false otherwise"}},"required":["code","label","required"]},"example":{"application/json":[[{"code":"optin1","label":"This optin is mandatory","required":true},{"code":"optin2","label":"This optin is optional","required":false}]]}},"GetOptinsError":{"type":"object","properties":{"code":{"type":"string","description":"Error codes for GET /banks\n* `invalidLanguage` - invalid language code\n","enum":["invalidLanguage"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"GetCustomerReceiptsResponse":{"type":"array","items":{"type":"object","title":"Receipt","properties":{"id":{"type":"string","description":"receipt id"},"transactionId":{"type":"string","description":"transaction Id"},"transactionDateTime":{"type":"string","description":"transaction Date time"},"status":{"type":"string","description":"Status of the receipt\n* `validated` - valid receipt\n* `rejected` - invalid receipt\n* `pending` - pending receipt\n","enum":["pending","rejected","validated"]},"receiptImageUrl":{"type":"string","description":"receipt uploaded image url"},"rejectionReason":{"type":"string","description":"Status of the receipt\n* `outOfMall` - out of mall ticket\n* `notATicket` - invalid picture\n* `incomplete` - one of the informations (date, time, amount, store) is missing\n* `notADebit` - not a debit transaction\n* `storeNotFound` - store not present in the list\n* `before_registration` - ticket date is grater than registration date\n* `incomplete-store` - the store is missing\n","enum":["outOfMall","notATicket","incomplete","notADebit","storeNotFound","before_registration","incomplete-store","notInClientReferential"]},"createdAt":{"type":"string","description":"date-time of creation of the receipt","format":"date-time"},"transaction":{"type":"object","description":"the associated transaction object","properties":{"id":{"type":"string","description":"the transaction id"},"transactionDate":{"type":"string","description":"the transaction date"},"amount":{"type":"string","description":"the transction amount"},"currency":{"type":"string","description":"the transaction currency"},"createdAt":{"type":"string","description":"the transaction creation date-time","format":"date-time"},"store":{"type":"object","description":"the store object associated to the transaction","properties":{"id":{"type":"string","description":"the store id"},"name":{"type":"string","description":"the name of the store"}}}}}},"required":["id","status","createdAt"]},"example":{"application/json":[[{"id":"2a804a3a-8da2-4ff1-8077-da588ba53a7d","status":"validated","receiptImageUrl":"https://cdn.transactionconnect.com/claims/staging/88035a54-e6bb-48ae-b526-d6cba060490a","rejectionReason":null,"createdAt":"2020-02-02T16:09:44.034Z","transaction":{"id":"f89c9349-283e-4664-9214-cf8cb702e150","transactionDate":"2020-02-01","amount":"-56.00","currency":"EUR","createdAt":"2020-02-02T16:10:32.743Z","store":{"id":"67322cca-03ad-4542-92b9-2dd20d73fb9f","name":"BASIC FIT"}}},{"id":"7adb2988-6b6e-4f84-8272-2b293af577a8","status":"validated","receiptImageUrl":"https://cdn.transactionconnect.com/claims/staging/88035a54-e6bb-48ae-b526-d6cba060490a","rejectionReason":null,"createdAt":"2020-02-02T17:44:07.552Z","transaction":{"id":"f1eb4c08-0075-4503-befc-3d74d78319a8","transactionDate":"2020-02-01","amount":"-56.00","currency":"EUR","createdAt":"2020-02-02T17:44:40.882Z","store":{"id":"c35cd149-2f80-4f5c-b932-08044c1641c6","name":"GIFI"}}}]]}},"GetCustomerOptinsResponse":{"type":"array","items":{"type":"object","title":"Optin","properties":{"code":{"type":"string","description":"optin code"},"label":{"type":"string","description":"optin label"},"required":{"type":"boolean","description":"true if optin is required, false otherwise"},"value":{"type":"boolean","description":"true for opt-in, false for opt-out"},"registrationType":{"type":"string","description":"optin type"}},"required":["code","label","required","value","registrationType"]},"example":{"application/json":[[{"code":"optin1","label":"This optin is opted in","value":true,"registrationType":"SCR"},{"code":"optin2","label":"This optin is opted out","value":false,"registrationType":"CLO"}]]}},"PostReceiptResponse":{"type":"object","properties":{"isProperReceiptExtract":{"type":"boolean","description":"true if extracted data contains all essential information we need, false otherwhise"}},"example":{"application/json":[{"isProperReceiptExtract":true}]}},"PostReceiptError":{"type":"object","properties":{"code":{"type":"string","description":"Error codes for POST /customer/receipts and POST /auth/receipt\n* `invalidCustomer` - Invalid customer identifier\n* `invalidOptins` - optins parameter is invalid\n* `invalidFileType` - Invalid file type\n* `tooLargeFile` - The provided file is too large\n","enum":["invalidCustomer","invalidOptins","invalidFileType","tooLargeFile"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"GetCustomerOptinsError":{"type":"object","properties":{"code":{"type":"string","description":"Error codes for GET /customer/optins\n* `invalidLanguage` - invalid language code\n","enum":["invalidLanguage"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"RegistrationRequest":{"type":"object","title":"RegistrationInfo","properties":{"phoneNumber":{"type":"string","description":"phone number, without any prefix"},"countryCode":{"type":"integer","description":"phone country code (i.e. 33 for France)"},"captcha":{"type":"string","description":"google recaptcha code to avoid bot registration"},"origin":{"type":"string","description":"customer origin","enum":["email","iOS-app","Android-app","website","desk"]},"referer":{"type":"string","description":"customer referer, a string identifying previous page visited before registering"},"customerExternalId":{"type":"string","description":"customer identifier in shopping hub repository"},"firstName":{"type":"string","description":"customer's first name"},"lastName":{"type":"string","description":"customer's last name"},"familyStatus":{"type":"string","description":"Family situation of the customer\n* `singleWithoutChildren` - single customer without children\n* `singleWithChildren` - single customer with children\n* `marriedWithoutChildren` - married customer without children\n* `marriedWithChildren` - married customer without children\n","enum":["singleWithoutChildren","singleWithChildren","marriedWithoutChildren","marriedWithChildren"]},"postalCode":{"type":"string","description":"The postal code of the address - can be alphanumeric, dashes or spaces"},"email":{"type":"string","description":"email of the customer"},"optins":{"type":"array","title":"Array","items":{"type":"object","properties":{"code":{"type":"string","description":"optin code get from GET /auth/optins API"},"value":{"type":"boolean","description":"true if the optin has been validated, false otherwhise"}}}},"outsideOptIn":{"type":"boolean","description":"true if customer accepts its out of mall transactions to be analyzed, false otherwhise"},"referralInfo":{"type":"object","title":"ReferralInfo","description":"referral information to get referral offer","properties":{"code":{"type":"string","description":"referral code"},"phoneNumber":{"type":"string","description":"referral's phone number, without any prefix"},"countryCode":{"type":"integer","description":"referral's phone country code (i.e. 33 for France)"}}},"preferredLanguage":{"type":"string","description":"customer preferred language for communication (email, sms...) - ISO 639-1 format is expected (i.e. fr-FR or en)"},"transactionsEligibleFromDate":{"type":"number","description":"Unix Timestamp (in seconds) representing the start date from where the customer's transactions will be pushed. If not provided, it will default to the customer's registrationDate"}}},"RegistrationResponse":{"type":"object","properties":{"customerId":{"type":"string","description":"id of connected customer"},"bankAlreadyConnected":{"type":"boolean","description":"true if customer is already known and has a bank account connected, false otherwhise"},"registrationToken":{"type":"string","description":"registration token to provide along the registration requests"}},"required":["customerId","bankAlreadyConnected"],"example":{"application/json":[{"customerId":"91c2003e-3eb0-87c6-ac8d-4fcaad4cbd19","bankAlreadyConnected":false}]}},"RegistrationError":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of registration\n* `phoneRequired` - phone number is required (countryCode + phoneNumber)\n* `emailRequired` - email is required\n* `customerExternalIdRequired` - customer external id (in hub repository)\n* `captchaRequired` - recaptcha code is required to ensure submission is not made by a bot\n* `invalidBirthDate` - birth date provided is invalid\n* `invalidEmail` - email is invalid\n* `invalidLanguage` - invalid preferred language\n* `invalidCaptcha` - provided captcha is invalid\n* `invalidOptins` - provided optins are invalid\n* `emailAlreadyUsed` - email is already taken\n* `externalIdAlreadyUsed` - external id is already taken\n* `numberAlreadyUsed` - phone number is already taken (legacy code, same as phoneAlreadyUsed)\n* `alreadyRegistered` - given customer already complete registration process\n* `invalidSponsorshipCode` - No valid sponsorship code\n* `invalidTransactionsEligibleFromDate` - Invalid transactionsEligibleFromDate: Valid values are dates between today and past 90 days\n* `invalidRegistration` - Registration is currently unavailable for this shopping hub\n","enum":["phoneRequired","emailRequired","customerExternalIdRequired","captchaRequired","invalidBirthDate","invalidEmail","invalidCaptcha","invalidLanguage","emailAlreadyUsed","phoneAlreadyUsed","externalIdAlreadyUsed","numberAlreadyUsed","alreadyRegistered","invalidSponsorshipCode"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"TransactionComplaintRequest":{"type":"object","properties":{"storeId":{"type":"string","description":"store identifier"},"externalId":{"type":"string","description":"customer external id"},"amount":{"type":"number","description":"transaction amount","format":"float"},"transactionDate":{"type":"string","description":"transaction date of the transaction assignment request","format":"date"},"additionalFeedback":{"type":"string","description":"additional feeback made by the customer","maxLength":255},"attachment":{"type":"string","description":"Attachment file (base64)"}},"required":["storeId","amount","transactionDate"]},"ComplaintError":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of POST /customer/transactions/complaint\n* `amountRequired` - Need to provide transaction amount parameter\n* `invalidAmount` - Invalid amount parameter\n* `invalidFileType` - Invalid attachment file type\n* `insufficientAmount` - Transaction amount is too low\n* `transactionDateRequired` - Need to provide transaction date parameter\n* `invalidTransactionDate` - Transaction date provided is invalid\n* `storeIdRequired` - Need to provide store id parameter.\n* `invalidStoreId` - Invalid store id parameter\n* `storeNotFound` - Store not found\n* `duplicate` - Same claim already made\n* `transactionDateBeforeRegistration` - Transaction date prior to registration date\n","enum":["storeNotFound","insufficientAmount","invalidFileType","transactionDateBeforeRegistration","amountRequired","duplicate","invalidAmount","transactionDateRequired","invalidTransactionDate","storeIdRequired","invalidStoreId"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"RetailerError":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of GET /backoffice/store\n* `retailerIdRequired` - Need to provide retailer id parameter\n* `invalidRetailerId` - Need to provide valid retailer id parameter\n","enum":["retailerIdRequired","invalidRetailerId"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"CreditCard":{"type":"object","description":"object containing credit card details","properties":{"id":{"type":"string"},"type":{"type":"string"},"scheme":{"type":"string"},"programId":{"type":"string"},"metadata":{"type":"object"},"live":{"type":"boolean"},"lastNumbers":{"type":"string"},"firstNumbers":{"type":"string"},"expMonth":{"type":"number"},"expYear":{"type":"number"},"expDate":{"type":"string"},"countryCode":{"type":"string"},"accountId":{"type":"string"}},"required":["id","lastNumbers","expDate","scheme","metadata"],"example":{"created":"2019-10-08T12:30:44.487Z","updated":"2019-10-08T12:30:44.487Z","id":"a83b4b96-568a-49f9-8019-d6fdff41c4c8","type":"visa","scheme":"visa","programId":"4c65afca-047b-4c3e-b079-761545a40e1d","metadata":{"id":"032ad8f4-098a-4187-aed9-5b1c05424df6"},"live":false,"lastNumbers":"4322","firstNumbers":"444400","expYear":2020,"expMonth":2,"expDate":"2020-02-29T23:59:59.999Z","countryCode":"CAN","accountId":"8e8aed10-19ae-4faf-8cd2-147b1d9d1b94"}},"AuthVerifyDecoupledConnectionRequest":{"type":"object","properties":{"decoupledDetails":{"type":"object","description":"object containing the decoupledDetails sent from the server to be used for the polling (the specified properties differ depending on the data provider)","properties":{"dataProviderId":{"type":"string"},"dataProviderShortcut":{"type":"string"},"connectionExternalId":{"type":"string"}}}},"required":["decoupledDetails"]},"AuthBankConnectionCallbackRequest":{"type":"object","properties":{"customerId":{"type":"string","description":"customer identifier get from /auth/register response"},"bankId":{"type":["string","null"],"description":"identifier of the bank to connect with (found in GET /banks)"},"dataProviderConnectionId":{"type":["string","null"],"description":"identifier of the bank connection in data provider repository (found in GET /banks)"},"queryString":{"type":"object","description":"object containing the temp code retrieved from psd2 callback login and the customer_id"},"redirectUri":{"type":"string","description":"the URI where to redirect to"}},"required":["customerId"]},"PostBankConnectionCallbackRequest":{"type":"object","properties":{"bankId":{"type":["string","null"],"description":"identifier of the bank to connect with (found in GET /banks)"},"queryString":{"type":"object","description":"object containing the temp code retrieved from psd2 callback login and the customer_id"},"redirectUri":{"type":"string","description":"the URI where to redirect to"}},"required":["queryString"]},"UpdateReceiptRequest":{"type":"object","properties":{"storeId":{"type":"string","description":"id of the store"},"receiptId":{"type":"string","description":"id of the receipt"}},"required":["storeId","receiptId"]},"SendEmailRoutineResponse":{"type":"object","properties":{"messageId":{"type":"string","description":"the email gateway message id"}},"required":["messageId"]},"AuthBankConnectionResponse":{"type":"object","properties":{"bankConnectionId":{"type":"string","description":"the identifier of the bank connection created"},"accessToken":{"type":"string","description":"access token, to provide in Authorization header for matching routes"}},"required":["bankConnectionId","accessToken"],"example":{"application/json":[{"bankConnectionId":"c0b88330-ec05-49c3-99eb-e67b1a1e3fc9","accessToken":"xxxxx.yyyyy.zzzzz"}]}},"VerifyDecoupledConnectionResponse":{"type":"object","properties":{"callbackUrl":{"type":"string","description":"the identifier of the bank connection created"},"status":{"type":"string","description":"status of the actual connection ( pending / completed / failed )"}},"example":{"application/json":[{"callbackUrl":"/oauthcallback?code=xxxx&customer_id=xxxxxx","status":"completed"}]}},"GetRandomTestimoniesResponse":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"identifier of the testimony"},"age":{"type":"integer","description":"interviewed person's age"},"description":{"type":"string","description":"Testimony's description"},"firstName":{"type":"string","description":"Interviewed person's first name"},"category":{"type":"string","description":"Testimony's category"}}},"example":{"application/json":[[{"id":"41c65e84-e30b-4f79-8f2a-92fe42c034de","birthDate":"1984-10-09","category":"benefits","description":"This is a benefits test testimony, it should be disabled and not display.","firstName":"Transaction","age":35}]]}},"AccessTokenResponse":{"type":"object","properties":{"accessToken":{"type":"string","description":"access token, to provide in Authorization header for matching routes"}},"required":["accessToken"],"example":{"application/json":[{"accessToken":"xxxxx.yyyyy.zzzzz"}]}},"ValidateExternalTokenResponse":{"type":"object","properties":{"token":{"type":"string","description":"the Spaycial JWT when the provided external token has been validated"},"customer":{"type":"object","properties":{"id":{"type":"string","description":"customer's unique identifier"},"registered":{"type":"boolean","description":"true if customer is registered, false otherwise"},"bankAlreadyConnected":{"type":"boolean","description":"information about customer's bank connection"}}}},"required":["token","customer"]},"BackOfficeGetTableauTokenResponse":{"type":"object","properties":{"tableauToken":{"type":"string","description":"access token for Tableau embbeded views"}}},"BackOfficeLoginResponse":{"type":"object","properties":{"accessToken":{"type":"string","description":"access token, to provide in Authorization header for matching routes"},"backUserId":{"type":"string","description":"back user's unique identifier"},"backUserEmail":{"type":"string","description":"back user's email"},"firstName":{"type":"string","description":"back user first name"},"lastName":{"type":"string","description":"back user's last name"},"profilePictureUrl":{"type":"string","description":"back user's profile picture URL"},"preferredLanguage":{"type":"string","description":"back user's preferred language code"},"phone":{"type":"string","description":"back user's phone"},"tableauTicket":{"type":"string","description":"a token to be used to access to Tableau embedded views"}},"required":["accessToken","backUserEmail","backUserId"],"example":{"application/json":[{"backUserId":"4452840f-2097-4089-bf60-4c5b4319177f","accessToken":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ7.eyJiYWNvPXNlcklkIjoiNDg3Mjg0MGYtMjA5Ny00MDg5LWJmNjAtNGM1YjQzMTkxODhmIiwiZnVuY3Rpb25hbGl0aWVzIjpbIlNVUFBPUlRfTFZMXzEiLCJIVUJfU0VUVVBfSU5JVCIsIlNUT1JFX1JFVEFJTEVSX01BTkFHRU1FTlQiLCJTVEFUSVNUSUNfQk9BUkQiLCJUUkFOU0FDVElPTl9QSU5QT0lOVCIsIkFETUlOIl0sImlhdCI6MTYyNjYzOTMzMywiZXhwIjoxNjI2NjQ2NTMzfQ.Es2YOnDMqx2mFi9LdPCopJ-rFriJu8Ah-uZofYJa17Q","backUserEmail":"jon.snow@thewatch.com","firstName":"Jon","lastName":"Snow","profilePictureUrl":"https://picsum.photos/200","preferredLanguage":"en-GB","phone":"+44 20 7234 3456"}]}},"GetStoresByExternalIdNotFoundError":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of the GET /customer/stores/all API, when resource not found\n* `customerNotFound` - Customer not found\n* `storeNotFound` - Store not found\n* `shoppingHubNotFound` - Shopping Hub not found\n","enum":["storeNotFound","customerNotFound","shoppingHubNotFound"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"PostStoresList":{"type":"object","properties":{"stores":{"type":"array","minItems":1,"maxItems":500,"items":{"type":"object","properties":{"storeExternalId":{"type":"string","description":"the store identifier in the client repository"},"retailerName":{"type":"string","description":"retailer name (brand name) for the store to create"},"address":{"type":"string","description":"formatted address of the store"},"locality":{"type":["null","string"],"description":"locality (most often a city) of the store"}},"required":["storeExternalId","retailerName"]}}}},"PostStoresListResponse":{"type":"object","properties":{"requestId":{"type":"string","description":"a unique identifier for the store synchronization request"}}},"SendInitialTransactionRequest":{"type":"object","properties":{"customerExternalId":{"type":"string","description":"the customer identifier in the client repository"},"storeExternalId":{"type":"string","description":"the store identifier in the client repository (must match the externalId provided when syncing stores via POST /admin/stores/v2)"},"transactionDate":{"type":"string","format":"date","description":"the date of the transaction (YYYY-MM-DD)"},"transactionAmount":{"type":"number","description":"the amount of the transaction"},"transactionLabel":{"type":"string","description":"the label of the transaction (optional but could help to spot the transaction)"}},"required":["customerExternalId","storeExternalId","transactionDate","transactionAmount"]},"SendInitialTransactionError":{"type":"object","properties":{"code":{"type":"string","description":"Error codes for initial transaction\n* `customerExternalIdRequired` - Customer external ID is required\n* `storeExternalIdRequired` - Store external ID is required\n* `transactionDateRequired` - Transaction date is required\n* `transactionAmountRequired` - Transaction amount is required\n* `invalidTransactionDate` - Transaction date is invalid\n* `invalidAmount` - Transaction amount is invalid\n* `customerNotFound` - Customer not found\n* `storeNotFound` - Store not found\n","enum":["customerExternalIdRequired","storeExternalIdRequired","transactionDateRequired","transactionAmountRequired","invalidTransactionDate","invalidAmount","customerNotFound","storeNotFound"]},"message":{"type":"string","description":"Error message"}},"required":["requestId"]},"PostStoresListError":{"type":"object","properties":{"code":{"type":"string","description":"Error codes\n* `invalidStores` - The store list is invalid. It should be an array of 1 to 500 items\n","enum":["invalidStores"]}}},"PostStoresListV2":{"type":"object","properties":{"stores":{"type":"array","minItems":1,"maxItems":500,"items":{"type":"object","properties":{"externalId":{"type":"string","minLength":1,"description":"the store identifier in your repository"},"brandName":{"type":"string","minLength":1,"description":"retailer name (brand name) for the store to create"},"isOnline":{"type":"boolean","description":"true if the store is an online point of sale, false if it's a brick and mortar point of sale"},"googlePlaceId":{"type":"string","minLength":1,"description":"the Google Places Identifier of the store, required when isOnline=false (see https://developers.google.com/maps/documentation/places/web-service/place-id)"},"website":{"type":"string","description":"the website of the store (ex. 'https://my-fashion-store.com'), required when isOnline=true"},"status":{"type":"string","description":"the store status. 'open' means the store is currently open for business, 'permanently_closed' means the store is permanently_closed and will never reopen.","enum":["open","permanently_closed"]},"inProgram":{"type":"boolean","description":"true if the store is part of the program (default value if not provided), false otherwise (for instance, in a loyalty program, a supermarket could be located in the mall but could be excluded from the offers of the program)"},"closingDate":{"type":"string","description":"date-time when the store has permanently closed (don't set this date if a store is temporary closed)","format":"date-time"}},"required":["externalId","brandName","isOnline","status"]}}}},"PostStoresListV2Response":{"type":"object"},"PostStoresListV2Error":{"type":"object","properties":{"code":{"type":"string","description":"Error codes\n* `RequestValidationError` - OpenAPI format error (for instance if a required parameter is missing or does not have the right format)\n","enum":["RequestValidationError"]}}},"BackofficePostStoresList":{"type":"object","properties":{"stores":{"type":"array","minItems":1,"maxItems":500,"items":{"type":"object","properties":{"id":{"type":"string","description":"the store identifier in Spaycial's database"},"storeExternalId":{"type":"string","description":"the store identifier in the client repository"},"retailerName":{"type":"string","description":"retailer name (brand name) for the store to create"},"address":{"type":"string","description":"formatted address of the store"},"locality":{"type":["null","string"],"description":"locality (most often a city) of the store"}}}}}},"BackofficePostStoresListResponse":{"type":"object","properties":{"requestId":{"type":"string","description":"a unique identifier for the store synchronization request"}},"required":["requestId"]},"BackofficePostStoresListError":{"type":"object","properties":{"code":{"type":"string","description":"Error codes\n* `invalidStores` - The store list is invalid. It should be an array of 1 to 500 items\n","enum":["invalidStores"]}}},"GetStoresByCustomerError":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of get stores by customer\n* `invalidCustomerId` - Invalid customer id parameter\n","enum":["invalidCustomerId"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"AuthBankConnectionError":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of bank connection\n* `bankNotFound` - Bank not found\n* `customerNotFound` - Customer not found\n* `bankNotAvailable` - Bank exists but is not available for connection\n* `alreadyRegistered` - Customer already complete registration process\n* `bankAlreadyConnected` - Customer already has a bank connection\n* `credentialsRequired` - Credentials are required\n* `invalidCredentials` - Provided credentials are invalid\n* `actionNeeded` - An action is needed on the bank website\n* `alreadyUsedCredentials` - Credentials already used\n* `invalidCustomer` - Invalid customer id\n* `providerError` - Failed to create connection with the bank\n","enum":["bankNotFound","customerNotFound","bankNotAvailable","alreadyRegistered","bankAlreadyConnected","credentialsRequired","invalidCredentials","actionNeeded","alreadyUsedCredentials","invalidCustomer","providerError"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"GetTokenError":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of GET /auth/token\n* `invalidCustomer` - Invalid customer id\n* `invalidExternalToken` - Invalid external token\n* `customerNotFound` - Customer not found\n* `incompleteRegistration` - Customer must complete registration\n","enum":["invalidCustomer","invalidExternalToken","customerNotFound","incompleteRegistration"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"AuthLoginRequest":{"type":"object","properties":{"phoneNumber":{"type":"string","description":"phone number, without any prefix"},"countryCode":{"type":"integer","description":"phone country code (i.e. 33 for France)"},"email":{"type":"string","description":"customer's email"},"password":{"type":"string","description":"customer's area password"}},"required":["password"]},"AuthLoginError":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of POST /auth/login\n* `incompleteRegistration` - Customer must complete registration before he can login\n* `invalidCredentials` - Invalid credentials\n* `blockedAccount` - Account is blocked\n","enum":["customerNotFound","incompleteRegistration"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"PasswordEmailError":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of GET /auth/login\n* `emailNotFound` - Email not found\n* `incompleteRegistration` - Customer must complete registration\n","enum":["emailNotFound","incompleteRegistration"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"GetTemporaryCodeError":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of GET /auth/temporaryCode\n* `unknownPhone` - Invalid phone number\n* `incompleteRegistration` - Customer must complete registration before asking a temporary code\n","enum":["unknownPhone","incompleteRegistration"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"PostTemporaryCodeRequest":{"type":"object","properties":{"phoneNumber":{"type":"string","description":"phone number, without any prefix"},"countryCode":{"type":"integer","description":"phone country code (i.e. 33 for France)"},"temporaryCode":{"type":"string","description":"temporary code, received by SMS"}},"required":["phoneNumber","countryCode","temporaryCode"]},"PostTemporaryCodeError":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of POST /auth/temporaryCode\n* `unknownPhone` - Invalid phone number\n* `incompleteRegistration` - Customer must complete registration before sending a temporary code\n* `invalidCode` - Provided code is invalid\n* `askCodeBefore` - No code asked before\n* `maxAttemptReached` - Max attempt reached\n* `expiredCode` - Code is too old\n","enum":["unknownPhone","incompleteRegistration","invalidCode","askCodeBefore","maxAttemptReached","expiredCode"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"PatchCustomerError":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of PATCH /customer\n* `nothingToPatch` - No customer attributes to patch was provided\n* `invalidPassword` - Password format is invalid\n* `invalidBirthDate` - Birth date format is invalid\n* `invalidLanguage` - invalid preferred language\n* `invalidEmail` - Email is invalid\n* `emailAlreadyUsed` - Email already linked to an account\n* `numberAlreadyUsed` - Phone number already linked to an account\n","enum":["nothingToPatch","invalidPassword","invalidBirthDate","invalidEmail","invalidLanguage","emailAlreadyUsed","numberAlreadyUsed"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"PostReferralExistsRequest":{"type":"object","properties":{"referralCode":{"type":"string","description":"the customer referral code"},"phoneNumber":{"type":"string","description":"phone number, without any prefix"},"countryCode":{"type":"integer","description":"phone country code (i.e. 33 for France)"}}},"ReferralError":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of POST /customer/referralExists\n* `noParameter` - Need to provide either referralCode or phoneNumber + countryCode params\n","enum":["noParameter"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"GetRandomTestimoniesError":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of get random testimonies\n* `invalidLanguage` - invalid language code\n","enum":["invalidLanguage"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"GetCustomerFavoriteAccountError":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of GET /customer/favoriteAccount\n* `invalidIban` - Invalid iban provided\n","enum":["noDefaultIban"]},"message":{"type":"string","description":"a short error description"}}},"PostFavoriteAccountError":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of POST /customer/favoriteAccount\n* `invalidIban` - Invalid iban provided\n* `alreadyUsedIban` - Provided IBAN is already used on another account\n","enum":["invalidIban"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"GetFavoriteLinkError":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of GET /customer/favoriteAccountLink\n* `no_account` - No account found for this customer\n* `already_sent` - SMS has already been sent few minutes ago\n","enum":["no_account","already_sent"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"GetCredentialLinkError":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of GET /customer/credentialUpdateLink\n* `unknown_phone` - Unknown phone number\n* `no_invalid_credentials` - No credential update needed\n* `already_sent` - SMS has already been sent few minutes ago\n","enum":["unknown_phone","no_invalid_credentials","already_sent"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"TransactionStoreError":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of GET /stores/transactions/{storeId}\n* `invalidStoreId` - No account found for this customer\n","enum":["invalidStoreId"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"TransactionServiceError":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of GET /services/transactions/{serviceId}\n* `invalidServiceId` - serviceId parameter is invalid\n","enum":["invalidServiceId"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"CashBackRequest":{"type":"object","properties":{"customerId":{"type":"string","description":"customer identifier in the Spaycial database"},"customerExternalId":{"type":"string","description":"the customer external id"},"externalId":{"type":"string","description":"the cashback external id (an optional reference of the cashback in your system)"},"ownerInfo":{"type":"object","description":"information about bank account owner","properties":{"firstName":{"type":"string","description":"The owner's first name"},"lastName":{"type":"string","description":"The owner's last name"},"birthDate":{"type":"string","description":"The owner's birth date, in full-date format of RFC3339","format":"date"},"email":{"type":"string","description":"The owner's email address - must be a valid email"},"nationality":{"type":"string","description":"The owner’s nationality. ISO 3166-1 alpha-2 format is expected","maxLength":2},"address":{"type":"object","description":"The owner's address","properties":{"addressLine1":{"type":"string","description":"The first line of the address"},"addressLine2":{"type":"string","description":"The second line of the address"},"city":{"type":"string","description":"The city of the address"},"region":{"type":"string","description":"The region of the address - this is optional except if the Country is US, CA or MX"},"postalCode":{"type":"string","description":"The postal code of the address - can be alphanumeric, dashes or spaces"},"country":{"type":"string","description":"The country code of the address - ISO 3166-1 alpha-2 format is expected","maxLength":2}},"required":["addressLine1","city","postalCode","country"]}},"required":["firstName","lastName","email"]},"transferInfo":{"type":"object","description":"information about the transfer to create","properties":{"iban":{"type":"string","description":"The IBAN of the bank account where the money need to be transferred - if not set, an automatic search of customer's IBAN will be done."},"amount":{"type":"integer","description":"an amount of money in the smallest sub-division of the currency, e.g. 12.60 EUR would be represented as 1260 whereas 12 JPY would be represented as just 12)"},"currency":{"type":"string","description":"transaction's currency in ISO_4217 format","minLength":3,"maxLength":3},"bankReference":{"type":"string","description":"A custom reference you wish to appear on the customer’s bank statement. This reference can contain max 12 characters","maxLength":12},"cashbackType":{"type":"string","description":"Cashback type\n* `standard` - Standard cashback (default value)\n* `parking` - Cashback matching a parking reward\n","enum":["standard","parking"]}},"required":["amount","currency"]}},"required":["ownerInfo","transferInfo"]},"CashBackError":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of POST /cashback\n* `invalidCustomer` - Invalid customer id\n* `invalidApiKeyHeader` - Invalid Api-Key header\n* `incompleteRegistration` - Customer must complete registration\n* `cashbackUnavailable` - Cashback has not been activated for this program\n* `invalidEmail` - Email is invalid\n* `invalidBirthDate` - Birth date provided is invalid\n* `invalidNationality` - Nationality provided is invalid. ISO 3166-1 alpha-2 format is expected.\n* `invalidAddress` - Address provided is invalid\n* `invalidIban` - Invalid iban provided\n* `noDefaultIban` - No default IBAN found for this customer\n* `invalidAmount` - The given amount is invalid\n* `invalidCurrency` - The given currency is invalid\n* `invalidBankReference` - The given bankReference is invalid\n* `cashbackFailed` - The Cashback transfer failed\n* `customerNotConnected` - The customer is not connected to the cashback provider\n","enum":["invalidCustomer","invalidApiKeyHeader","incompleteRegistration","cashbackUnavailable","invalidEmail","invalidBirthDate","invalidNationality","invalidAddress","invalidIban","noDefaultIban","invalidAmount","invalidCurrency","invalidBankReference","cashbackFailed","customerNotConnected"]},"message":{"type":"string","description":"a short error description"},"transferErrorCode":{"type":"string","description":"An error code, set when the code is 'cashbackFailed'\n* `insufficientWalletBalance` - Insufficient wallet balance\n* `fraudPolicy` - Refused due to the Fraud Policy\n* `kyc` - The KYC limits for the customer have been reached\n* `other` - The cashback was refused due to another reason\n","enum":["insufficientWalletBalance","fraudDetected","kyc","other"]},"statusCode":{"type":"number","description":"http error code"}},"required":["code","message"]},"CashBackListError":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of POST /cashback\n* `invalidApiKeyHeader` - Invalid Api-Key header\n","enum":["invalidApiKeyHeader"]},"message":{"type":"string","description":"a short error description"},"transferErrorCode":{"type":"string","description":"An error code, set when the code is 'cashbackFailed'\n* `insufficientWalletBalance` - Insufficient wallet balance\n* `fraudPolicy` - Refused due to the Fraud Policy\n* `kyc` - The KYC limits for the customer have been reached\n* `other` - The cashback was refused due to another reason\n","enum":["insufficientWalletBalance","fraudDetected","kyc","other"]}},"required":["code","message"]},"CashBackResponse":{"type":"object","title":"CashBackResponse","properties":{"transferId":{"type":"string","description":"The identifier of the transfer"}},"required":["transferId"],"example":{"application/json":[{"transferId":"8494514"}]}},"CashBackListResponse":{"type":"array","items":{"type":"object","title":"CashBackResponse","properties":{"transferId":{"type":"string","description":"The identifier of the transfer"}},"required":["transferId"],"example":{"application/json":[{"transferId":"8494514"}]}},"example":{"application/json":[[{"transferId":"8494514"},{"status":"ERROR","code":"invalidCustomer","message":"Invalid customer id","statusCode":400}]]}},"GetCoordinatesPointResponse":{"type":"object","title":"GetCoordinatesPointResponse","properties":{"features":{"type":"array","description":"the list of the stores","items":{"type":"object","properties":{"properties":{"type":"object","description":"Description of the store with name, city, country and formatted Address"},"geometry":{"type":"object","description":"Coordinates points of the store","properties":{"coordinates":{"type":"array","items":{"type":"number","description":"Longitude and latitude of the store"}}}}}}}}},"GetStoresResponse":{"type":"object","title":"GetStoreResponse","properties":{"stores":{"type":"object","description":"the list of store fetch"},"countries":{"type":"object","description":"List of all countries where a store exists in Spaycial's database"},"cities":{"type":"object","description":"List of all cities where a store exists in Spaycial's database"},"limit":{"type":"string","description":"Max result of the query"},"offset":{"type":"string","description":"the results offset used to paginate"}}},"StoreCreationResponse":{"type":"object","title":"StoreCreationResponse","properties":{"storeId":{"type":"string","description":"The identifier of the store"}},"required":["storeId"]},"GetShoppingHubResponse":{"type":"object","properties":{"id":{"type":"string","description":"the shopping hub id"},"name":{"type":"string","description":"the shopping hub Owner Name"},"shortcut":{"type":"string","description":"the shortcut"},"hubType":{"type":"string","description":"the hub type"},"city":{"type":"string","description":"the city"},"formattedAddress":{"type":"string","description":"the formatted Address"},"apiKey":{"type":"string","description":"the API key"},"country":{"type":"string","description":"the country"},"host":{"type":"string","description":"The host"},"contactEmail":{"type":"string","description":"The contact email"},"supportContactEmail":{"type":"string","description":"The support contact email"},"programName":{"type":"string","description":"the program Name"},"mainLanguage":{"type":"string","description":"the main Language"},"phoneRequired":{"type":"boolean","description":"the phone is Required"},"emailRequired":{"type":"boolean","description":"the email is Required"},"customerExternalIdRequired":{"type":"boolean","description":"the customer external id is Required"},"scanEnable":{"type":"boolean","description":"Determine if scan feature is enable for shopping hub"},"cardRestaurantEnable":{"type":"boolean","description":"The card restaurant is enabled"},"externalId":{"type":"string","description":"the external Id"},"recaptchaSiteKey":{"type":"string","description":"the reCaptcha key"},"googleAnalyticsId":{"type":"string","description":"the google anlytics Id"},"hotjarId":{"type":"string","description":"the hotjar Id"},"zendeskId":{"type":"string","description":"The Zendesk Id"},"fidelProgramId":{"type":"string","description":"the Fidel program id"},"currency":{"type":"string","description":"hub's currency in ISO_4217 format","minLength":3,"maxLength":3},"hasExternalFront":{"type":"boolean","description":"true if shopping hub has an external interface implementation, false otherwise"},"propertyManager":{"type":"string","description":"the property manager"},"cookieId":{"type":"string","description":"the cookie Id"},"cookieVersion":{"type":"string","description":"the cookie version"},"shoppingHubOwner":{"type":"object","description":"The Shopping Hub Owner general information","properties":{"id":{"type":"string","description":"the Shopping Hub Owner Id"},"name":{"type":"string","description":"the Shopping Hub Owner name"},"shortcut":{"type":"string","description":"the Shopping Hub Owner shortcut"},"transactionActivitiesIsDisplayed":{"type":"boolean","description":"display or don't display the customer's transactions table in the customer area"}}},"hasWestfield":{"type":"boolean","description":"client affiliation"},"interface":{"type":"object","properties":{"baseline":{"type":"string","description":"the baseline specific of each hub"},"colorPrimary":{"type":"string","description":"primary color of the hub uses in funnel and customer area"},"colorSecondary":{"type":"string","description":"The secondary color"},"css":{"type":"string","description":"the css of the shopping hub"},"logoProgramUrl":{"type":"string","description":"url of the program logo"},"faviconCode":{"type":"string","description":"code used to get the resources files of the hub"},"hasLandingPage":{"type":"boolean","description":"display or don't a landing page for the hub"}}},"cashbackProvider":{"type":"string","description":"The cashback provider active on this hub (ex. CO or MP)"},"checkoutPublicKey":{"type":"string","description":"The Checkout public key"},"programOffer":{"type":"string","description":"the program offer"},"scanConditions":{"type":"string","description":"the scan conditions"},"claimMinimumAmount":{"type":"string","description":"the minimum amount required when posting a claim"},"rewardType":{"type":"string","enum":["CASHBACK","GIFT_CARD"],"description":"Type of reward"},"languages":{"type":"array","description":"Array of available language for this shoppingHub","items":{"type":"object","description":"An available language for this shoppingHub","properties":{"country":{"type":"string","description":"the language associated to this item"},"favorite":{"type":"boolean","description":"the priority of this language"}}}},"features":{"type":"array","description":"Array of available features for this shoppingHub","items":{"type":"object","description":"An available feature for this shoppingHub","properties":{"name":{"type":"string"},"configuration":{"type":"object"}}}}}},"RetailerCreationResponse":{"type":"object","title":"RetailerCreationResponse","properties":{"retailerId":{"type":"string","description":"The identifier of the retailer"}},"required":["retailerId"]},"PostWebhookRequest":{"type":"object","properties":{"name":{"type":"string","description":"an optional webhook name to let the client identify the webhooks"},"url":{"type":"string","description":"the webhook endpoint to post events"},"events":{"type":"array","minItems":1,"items":{"type":"string","description":"Webhook events\n* `bank_connections_update` - A bank connection has failed or resolved\n* `bank_connections_update_v2` - A bank connection is created, updated or removed\n* `bank_status_update` - Event trigger when bank active status is updated\n* `bank_association_notification` - A bank has been removed or added to a program\n* `cashbacks_updated` - A cashback has been updated\n* `customer_creation` - A customer has been created\n* `customer_subscription` - A change occurred in a customer subscription\n* `claim_update` - A claim has been posted, validated or rejected\n* `customer_transactions` - A customer transaction has been created (mall programs only)\n* `all_transactions` - All enriched transactions for non-mall programs\n* `receipt_updated` - A receipt status has been updated (pending, validated, rejected)\n* `cashback_method_updated` - A cashback method (IBAN or credit card)\n* `store_list_updated` - A request has been made to POST /admin/stores and the store referential update is over\n* `offer_updated` - An offer of the loyalty program has been created or updated\n* `reward_updated` - A member of the program has made progress on a given offer\n* `initial_transaction_update` - An initial transaction status has been updated (created, validated, rejected)\n","enum":["bank_connections_update","claim_update","bank_status_update","bank_association_notification","bank_connections_update_v2","customer_creation","customer_subscription","customer_transactions","all_transactions","receipt_updated","cashback_method_updated","cashbacks_updated","store_list_updated","offer_updated","reward_updated","initial_transaction_update"]}},"active":{"type":"boolean","description":"weather the webhook is active","default":true}},"required":["url","events"]},"GetWebhooksResponse":{"type":"array","items":{"type":"object","properties":{"webhookId":{"type":"string","description":"the webhook id"},"name":{"type":"string","description":"an optional webhook name"},"url":{"type":"string","description":"the webhook endpoint to post events"},"events":{"type":"array","items":{"type":"string","description":"Webhook events\n* `bank_connections_update` - A bank connection has failed or resolved\n* `bank_connections_update_v2` - A bank connection is created, updated or removed\n* `bank_status_update` - Event trigger when bank active status is updated\n* `bank_association_notification` - A bank has been removed or added to a program\n* `cashback_method_updated` - A cashback method (IBAN or credit card)\n* `cashbacks_updated` - A cashback has been updated\n* `customer_creation` - A customer has been created\n* `customer_subscription` - A customer subscribed\n* `customer_transactions` - A customer transaction has been created (mall programs only)\n* `all_transactions` - All enriched transactions for non-mall programs\n* `receipt_updated` - A receipt status has been updated (pending, validated, rejected)\n* `store_list_updated` - A request has been made to POST /admin/stores and the store referential update is over\n* `offer_updated` - An offer of the loyalty program has been created or updated\n* `reward_updated` - A member of the program has made progress on a given offer\n* `initial_transaction_update` - An initial transaction status has been updated (created, validated, rejected)\n","enum":["bank_connections_update","bank_status_update","bank_association_notification","bank_connections_update_v2","customer_creation","customer_subscription","customer_transactions","all_transactions","receipt_updated","cashback_method_updated","cashbacks_updated","store_list_updated","offer_updated","reward_updated","initial_transaction_update"]}},"active":{"type":"boolean","description":"whether the webhook is active"}}}},"WebhookResponse":{"type":"object","properties":{"webhookId":{"type":"string","description":"the webhook id"}},"required":["webhookId"]},"WebhookError":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of bank connection\n* `invalidURL` - Url is not valid\n* `eventDoesNotExist` - Some events doeas not exist\n* `invalidApiKeyHeader` - Invalid Api-Key header\n","enum":["invalidURL","eventDoesNotExist","invalidApiKeyHeader"]}}},"PatchWebhookRequest":{"type":"object","properties":{"webhookId":{"type":"string","description":"the webhookId to patch"},"name":{"type":"string","description":"an optional webhook name to let the client identify the webhooks"},"url":{"type":"string","description":"the webhook endpoint to post events"},"events":{"type":"array","minItems":1,"items":{"type":"string","description":"Webhook events\n* `bank_connections_update` - A bank connection has failed or resolved\n* `bank_connections_update_v2` - A bank connection is created, updated or removed\n* `bank_status_update` - Event trigger when bank active status is updated\n* `bank_association_notification` - A bank has been removed or added to a program\n* `cashbacks_updated` - A cashback has been updated\n* `customer_creation` - A customer has been created\n* `customer_subscription` - A customer subscribed\n* `customer_transactions` - A customer transaction has been created (mall programs only)\n* `all_transactions` - All enriched transactions for non-mall programs\n* `receipt_updated` - A receipt status has been updated (pending, validated, rejected)\n* `cashback_method_updated` - A cashback method (IBAN or credit card)\n* `store_list_updated` - A request has been made to POST /admin/stores and the store referential update is over\n* `offer_updated` - An offer of the loyalty program has been created or updated\n* `reward_updated` - A member of the program has made progress on a given offer\n* `initial_transaction_update` - An initial transaction status has been updated (created, validated, rejected)\n","enum":["bank_connections_update","bank_status_update","bank_association_notification","bank_connections_update_v2","customer_creation","customer_subscription","customer_transactions","all_transactions","receipt_updated","cashback_method_updated","cashbacks_updated","store_list_updated","offer_updated","reward_updated","initial_transaction_update"]}},"active":{"type":"boolean","description":"weather the webhook is active","default":true}},"required":["webhookId"]},"CreditCardConnectionRequest":{"type":"object","properties":{"creditCardToken":{"type":"string","description":"credit card token (issued by Checkout tokenization)"}},"required":["creditCardToken"]},"CreditCardConnectionResponse":{"type":"object","properties":{"creditCardId":{"type":"string","description":"the identifier of the credit card created"}},"required":["creditCardId"],"example":{"application/json":[{"creditCardId":"c0b88330-ec05-49c3-99eb-e67b1a1e3fc9"}]}},"CreditCardConnectionError":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of bank connection\n* `notFullyRegistered` - Customer not fully registered\n* `creditCardRequired` - Credit Card is required\n* `cardAlreadyLinked` - Credit Card is already linked to the program\n* `errorLinkingCard` - Error while linking card to the program\n* `invalidTokenFormat` - Error while linking card to the program\n","enum":["notFullyRegistered","creditCardRequired","cardAlreadyLinked","errorLinkingCard","invalidTokenFormat"]}}},"TriggerWebhookResponse":{"type":"object","properties":{"configuredEndpoints":{"type":"integer","minimum":0,"description":"Number of endpoint configured"},"successCalls":{"type":"integer","minimum":0,"description":"Number of successful endpoint call"},"failedCalls":{"type":"integer","minimum":0,"description":"Number of failed endpoint call"}},"required":["configuredEndpoints","successCalls","failedCalls"]},"PostBankConnectionResponse":{"type":"object","properties":{"bankConnectionId":{"type":"string","description":"the identifier of the bank connection created"}},"required":["bankConnectionId"],"example":{"application/json":[{"bankConnectionId":"c0b88330-ec05-49c3-99eb-e67b1a1e3fc9"}]}},"PostBankConnectionError":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of bank connection\n* `bankNotFound` - Bank not found\n* `bankNotAvailable` - Bank exists but is not available for connection\n* `notFullyRegistered` - Customer not fully registered\n* `credentialsRequired` - Credentials are required\n* `invalidCredentials` - Provided credentials are invalid\n* `actionNeeded` - An action is needed on the bank website\n* `alreadyUsedCredentials` - Credentials already used\n* `providerError` - Failed to create connection with the bank\n* `connectionAlreadyExists` - The customer already have a connection with this bank\n","enum":["bankNotFound","bankNotAvailable","notFullyRegistered","credentialsRequired","invalidCredentials","actionNeeded","alreadyUsedCredentials","creditCardAlreadyConnected","providerError","connectionAlreadyExists"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"UpdateStoreError":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of store update\n* `storeIdRequired` - Store id is required\n* `invalidStoreId` - Invalid store id\n* `invalidRetailerId` - Invalid retailer id\n* `nothingToPatch` - Nothing to patch\n","enum":["storeIdRequired","invalidStoreId","invalidRetailerId","nothingToPatch"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"UpdateRetailerError":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of store update\n* `retailerIdRequired` - Retailer id is required\n* `invalidRetailerId` - Invalid retailer id\n* `nothingToPatch` - Nothing to patch\n","enum":["retailerIdRequired","invalidRetailerId","nothingToPatch"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"ReceiptUpdateError":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of bank connection update\n* `invalidStoreId` - provided store id is invalid\n","enum":["invalidStoreId"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"OptinsUpdateRequest":{"type":"object","properties":{"registrationType":{"type":"string","default":"SCR","description":"type of optin's registration (default 'SCR': web scrapping)"},"optins":{"type":"array","items":{"type":"object","title":"Optin","properties":{"code":{"type":"string","description":"optin code"},"label":{"type":"string","description":"optin code"},"value":{"type":"boolean","description":"true for opt-in, false for opt-out"}},"required":["code","value"]},"example":{"application/json":[[{"code":"optin1","value":true},{"code":"optin2","value":false}]]}}},"required":["optins"]},"OptinsUpdateError":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of bank connection update\n* `invalidOptins` - provided optins are invalid\n","enum":["invalidOptins"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"OptinsUpdateResponse":{"type":"array","items":{"type":"object","title":"Optin","properties":{"code":{"type":"string","description":"optin code"},"value":{"type":"boolean","description":"true for opt-in, false for opt-out"}},"required":["code","value"]}},"BankConnectionUpdateRequest":{"type":"object","properties":{"credentials":{"type":"object","description":"object containing bank credentials"},"redirectUri":{"type":"string","description":"the URI where to redirect to"},"locale":{"type":"string","description":"for some banks, a locale can be provided to define the bank portal language"},"psuId":{"type":"string","description":"psuId which is the identification number of the user"},"chosenAuthModel":{"type":"string","description":"the chosen authentication model which is redirect or decoupled"}}},"AdminBankConnectionUpdateError":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of bank connection update\n* `invalidConnectionId` - Invalid bank connection id\n","enum":["invalidConnectionId"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"BankConnectionUpdateError":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of bank connection update\n* `invalidConnectionId` - Invalid connection id\n* `credentialsRequired` - Credentials are required\n* `bankConnectionNotFound` - Bank connection not found\n* `customerNotFound` - Customer not found\n* `invalidCredentials` - Provided credentials are invalid\n* `actionNeeded` - An action is needed on the bank website\n* `ConnectionNotFoundInSe` - Connection Not Found In Salt Edge\n* `bankAlreadyConnected` - Customer has already connected this bank\n* `CustomerIdIsNotAUuid` - Customer is not a valid uuid\n* `bankConnectionAlreadySynchronized` - Bank connection is not in error state, no need to resync because it could spoil active FT connection\n* `providerError` - Failed to create connection with the bank\n","enum":["invalidConnectionId","CustomerIdIsNotAUuid","credentialsRequired","bankConnectionNotFound","customerNotFound","invalidCredentials","actionNeeded","bankAlreadyConnected","ConnectionNotFoundInSe","bankConnectionAlreadySynchronized","providerError"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"BankConnectionDeleteError":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of bank connection delete\n* `invalidConnectionId` - Invalid connection id\n* `bankConnectionNotFound` - Bank connection not found\n* `customerNotFound` - Customer not found\n","enum":["invalidConnectionId","bankConnectionNotFound","customerNotFound"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"CustomerTrackError":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of bank connection delete\n* `eventNameNotFound` - Event name was not found\n* `customerNotFound` - Customer not found\n* `invalidCustomerId` - Customer id is not valid\n","enum":["customerNotFound","eventNameNotFound","invalidCustomerId"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"ConnectionDeleteError":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of bank connection delete\n* `invalidConnectionId` - Invalid connection id\n* `bankConnectionNotFound` - Bank connection not found\n* `customerNotFound` - Customer not found\n* `customerIdMismatch` - Customer id doesn't match\n","enum":["invalidConnectionId","bankConnectionNotFound","customerNotFound","customerIdMismatch"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"ReferralResponse":{"type":"object","title":"ReferralInfo","properties":{"referralExists":{"type":"boolean","description":"true if referral exists, false otherwhise"},"referralFirstName":{"type":"string","description":"the first name of referral if exists"},"referralNbMonth":{"type":"integer","description":"the referral's number of month since registration (if exists)"}},"required":["referralExists"],"example":{"application/json":[{"referralExists":true}]}},"PointsHistoryElement":{"type":"object","title":"PointsHistoryElement","properties":{"id":{"type":"string"},"operationDate":{"type":"string","format":"date-time"},"value":{"type":"number"},"type":{"type":"string","enum":["SPEND","EARNED_FROM_TRANSACTION_IN_MALL"]}}},"StoresTransactionsResponse":{"type":"object","title":"Transaction","properties":{"date":{"type":"string","description":"transaction date, in full-date format of RFC3339","format":"date"},"storeId":{"type":"string","description":"the identifier of the store where transaction occurred"},"amount":{"type":"number","description":"transaction amount","format":"float"},"currency":{"type":"string","description":"transaction's currency in ISO_4217 format","minLength":3,"maxLength":3}},"required":["date","storeId","amount","currency"],"example":{"application/json":[{"date":"2016-12-07","storeId":"{08228F4D-3FA0-4F1D-AC53-1C13B5E24968}","amount":-15,"currency":"EUR"},{"date":"2016-12-08","storeId":"{18228F4D-4FA3-4F1D-9C55-DC13B5E24954}","amount":-40.95,"currency":"EUR"}]}},"ServicesTransactionResponse":{"type":"object","title":"Transaction","properties":{"date":{"type":"string","description":"transaction date, in full-date format of RFC3339","format":"date"},"serviceId":{"type":"string","description":"the identifier of the service where transaction occurred"},"amount":{"type":"number","description":"transaction amount","format":"float"},"currency":{"type":"string","description":"transaction's currency in ISO_4217 format","minLength":3,"maxLength":3}},"required":["date","serviceId","amount","currency"]},"GetCLOConnectionResponse":{"type":"object","title":"CLOConnectionInfo","properties":{"customerId":{"type":"string","description":"customer id in the Spaycial repository"},"connections":{"type":"array","title":"Array","items":{"type":"object","description":"object containing credit card details","properties":{"id":{"type":"string"},"type":{"type":"string"},"scheme":{"type":"string"},"programId":{"type":"string"},"metadata":{"type":"object"},"live":{"type":"boolean"},"lastNumbers":{"type":"string"},"firstNumbers":{"type":"string"},"expMonth":{"type":"number"},"expYear":{"type":"number"},"expDate":{"type":"string"},"countryCode":{"type":"string"},"accountId":{"type":"string"}},"required":["id","lastNumbers","expDate","scheme","metadata"],"example":{"created":"2019-10-08T12:30:44.487Z","updated":"2019-10-08T12:30:44.487Z","id":"a83b4b96-568a-49f9-8019-d6fdff41c4c8","type":"visa","scheme":"visa","programId":"4c65afca-047b-4c3e-b079-761545a40e1d","metadata":{"id":"032ad8f4-098a-4187-aed9-5b1c05424df6"},"live":false,"lastNumbers":"4322","firstNumbers":"444400","expYear":2020,"expMonth":2,"expDate":"2020-02-29T23:59:59.999Z","countryCode":"CAN","accountId":"8e8aed10-19ae-4faf-8cd2-147b1d9d1b94"}}}},"required":["customerId","connections"]},"GetAllConnectionsResponse":{"type":"object","title":"ConnectionInfo","properties":{"customerId":{"type":"string","description":"customer id in the Spaycial repository"},"connections":{"type":"array","title":"Array","items":{"type":"object","title":"Connection","properties":{"id":{"type":"string","description":"the connection id"},"creationDate":{"type":"string","format":"date","description":"creation of the connection, in date-time format of RFC3339"},"type":{"type":"string","description":"type of data provider connection","enum":["CLO","PSD2","SCR"]},"bankId":{"type":"string","description":"bank identifier (as found in GET /banks) (provided only for connections of type PSD2 and SCR)"},"bankName":{"type":"string","description":"bank name (provided only for connections of type PSD2 and SCR)"},"cardType":{"type":"string","description":"type of card associated to this bank (bank vs restaurant )","enum":["bank","restaurant"]},"lastUpdate":{"type":"string","description":"the last time data has been successfuly fetch from the bank by the data provider, in date-time format of RFC3339 (provided only for connections of type PSD2 and SCR)","format":"date"},"passwordError":{"type":"boolean","description":"true if bank password needs to be updated, false otherwise (provided only for connections of type PSD2 and SCR)"},"scheme":{"type":"string","description":"credit card's scheme (provided only for connections of type CLO)"},"lastNumbers":{"type":"string","description":"credit card's last four numbers (provided only for connections of type CLO)"},"expDate":{"type":"string","description":"credit card's expire date (provided only for connections of type CLO)","format":"date"},"countryCode":{"type":"string","description":"credit card's country code ex:\"SE\" (provided only for connections of type CLO)"},"bankActive":{"type":"boolean","description":"false if a bank corresponding to the connection is deactivated (thus resync is not possible at the moment)"}},"required":["id","creationDate","type","cardType"]}}},"required":["customerId","connections"]},"GetBankConnectionResponse":{"type":"object","title":"ConnectionInfo","properties":{"customerId":{"type":"string","description":"customer id in the Spaycial repository"},"connections":{"type":"array","title":"Array","items":{"type":"object","title":"BankConnection","properties":{"id":{"type":"string","description":"bank connection id"},"bankId":{"type":"string","description":"bank identifier (as found in GET /banks)"},"bankName":{"type":"string","description":"bank name"},"cardType":{"type":"string","description":"type of card associated to this bank (bank vs restaurant )","enum":["bank","restaurant"]},"creationDate":{"type":"string","description":"bank connection creation date, in full-date format of RFC3339","format":"date"},"lastUpdate":{"type":"string","description":"the last time data has been successfuly fetch from the bank by the data provider, in date-time format of RFC3339","format":"date"},"passwordError":{"type":"boolean","description":"true if bank password needs to be updated, false otherwise"},"type":{"type":"string","description":"type of connection","enum":["SCR","PSD2"]}},"required":["id","bankId","bankName","creationDate","passwordError"]}}},"required":["customerId","connections"],"example":{"application/json":[{"customerId":"27b36da1-39f2-5ab5-8784-52a78779af58","connections":[{"id":"b6255bf6-b293-424d-9363-d94700aca720","bankId":"0ef0f298-47ab-41f6-ae89-f1f6dab94104","bankName":"Some Bank","creationDate":"2018-01-17"},{"id":"e13c5c09-f71f-4139-869a-3b228109594a","bankId":"63cbd7cc-d65e-4e36-817a-ef3774f2a5ce","bankName":"Another Bank","creationDate":"2018-01-22"}]}]}},"GetBOCustomerResponse":{"type":"object","properties":{"infoCustomer":{"items":{"type":"object","properties":{"email":{"type":"string","description":"email of the customer"},"phone":{"type":"number","description":"phone number of the customer"},"countryCallingCode":{"type":"number","description":"country code of the phone number"},"createdAt":{"type":"string","description":"date-time of the account creation","format":"date-time"},"registrationDate":{"type":"string","description":"date of the account registration","format":"date"},"nbPasswordAttempt":{"type":"number","description":"the total password attempt made by customer"},"totalRewards":{"type":"number","description":"the total amount of rewards \"refound\" for a customer"}}}},"countReceipt":{"items":{"type":"object","properties":{"validated":{"type":"number","description":"the total of validated receipts"},"totalscan":{"type":"number","description":"the total of receipts"}}}}}},"GetBOBankConnectionsResponse":{"items":{"type":"array","properties":{"bankConnection":{"items":{"type":"object","properties":{"name":{"type":"string","description":"name of the bank"},"createdAt":{"type":"string","description":"date-time of the bank connection creation","format":"date-time"},"error":{"type":"string","description":"error of the bank connection"},"lastUpdate":{"type":"string","description":"the last time data has been successfuly fetch from the bank by the data provider, in date-time format of RFC3339","format":"date-time"},"bankConnectionId":{"type":"string","description":"the id of the bank connection"}}}}}}},"SearchCustomerResponse":{"items":{"type":"array","properties":{"customerIdList":{"items":{"type":"object","properties":{"id":{"type":"string","description":"the id of a customer"},"shoppingHubId":{"type":"string","description":"the shopping hub id of the customer"},"registred":{"type":"boolean","description":"if the customer is registred"},"registrationDate":{"type":"string","description":"the date when the customer registred","format":"date"},"ShoppingHub":{"type":"object","properties":{"name":{"type":"string","description":"the shopping hub name"}}}}}}}}},"GetCustomerTransactionComplaintResponse":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"id of the customer transaction complaint"},"transactionDate":{"type":"string","description":"date of the associated transaction","format":"date"},"attachmentUrl":{"type":"string","description":"url of the complaint attachment"},"amount":{"type":"number","description":"the amount of the transaction"},"claimStatus":{"type":"string","description":"Status of the claim\n* `validated` - complaint was validated\n* `rejected` - complaint was rejected\n* `pending` - complaint is pending\n","enum":["validated","rejected","pending"]},"createdAt":{"type":"string","description":"customer transaction complaint date-time of creation","format":"date-time"},"updatedAt":{"type":"string","description":"last update of the customer transaction complaint","format":"date-time"},"store":{"type":"object","description":"the store associated to this customer transaction complaint","properties":{"id":{"type":"string","description":"id of the store"},"name":{"type":"string","description":"name of the store"}}},"rejectionReason":{"type":"string","description":"Reasons of the claim rejection if the status is rejected\n* `Transaction already associated` - transaction was already associated\n* `Transaction not found` - transaction was not found\n* `The store is out of program` - store is out of the program\n* `Duplicated claim` - complaint is duplicated\n* `Automatically rejected` - automatically rejected\n* `Before registration date` - before registration date\n* `Incomplete ticket` - incomplete ticket\n"},"rejectionReasonTranslationKey":{"type":"string","description":"rejection reason translation key in order to translate it with localisation service"}},"required":["id","transactionDate","createdAt","updatedAt","store"]}}},"GetRewardsResponse":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"id of the reward"},"rewardState":{"type":"string","description":"Status of the reward\n* `TRAN` - cashback initiated\n* `PEND` - pending\n* `TERM` - complete\n* `RFND` - cashback validated\n* `CNCL` - gift card cancelled\n* `ERR` - provider error, requires investigation\n","enum":["TRAN","PEND","TERM","RFND","CNCL","ERR"]},"createdAt":{"type":"string","description":"reward date-time of creation","format":"date-time"},"updatedAt":{"type":"string","description":"last update of the reward","format":"date-time"},"rewardValue":{"type":"number","description":"value of the reward"},"redeemed":{"type":"boolean","description":"whether the reward has been redeemed or not (specific to Gift card challenges)"},"redeemDate":{"type":"string","format":"date-time","description":"the date when the reward has been redeemed (specific to Gift card challenges)"},"cashbackId":{"type":"number","description":"the cashback id"},"cashbackStatus":{"type":"number","description":"the cashback id"},"giftcardBarcodeUrl":{"type":"string","description":"SELP barcode URL for the reward when available"},"giftcardPin":{"type":"string","description":"gift card pin for the reward when available"},"challenge":{"type":"object","description":"the challenge associated to this reward","properties":{"id":{"type":"string","description":"id of the challenge"},"name":{"type":"string","description":"name of the challenge"},"teaser":{"type":"string","description":"teaser of the challenge"},"startDate":{"type":"string","description":"the challenge start date","format":"date-time"},"endDate":{"type":"string","description":"the challenge end date","format":"date-time"},"conditionLabel":{"type":"string","description":"the challenge condition label"},"terms":{"type":"string","description":"the challenge terms of service"},"rewardLabel":{"type":"string","description":"the reward label"}}}},"required":["id","rewardState","createdAt","updatedAt"]}}},"GetCustomerResponse":{"type":"object","title":"CustomerInfo","properties":{"customerId":{"type":"string","description":"customer's id"},"hubExternalId":{"type":"string","description":"hub external id'"},"hubName":{"type":"string","description":"hub's name"},"firstName":{"type":"string","description":"customer's first name"},"lastName":{"type":"string","description":"customer's last name"},"scanEnable":{"type":"boolean","description":"true if scan is enable for customer, false otherwise"},"email":{"type":"string","description":"customer's email"},"bankAlreadyConnected":{"type":"boolean","description":"information about customer's bank connection"},"registered":{"type":"boolean","description":"true if customer is registered, false otherwise"},"phoneVerified":{"type":"boolean","description":"information about customer's phone verfication"},"phoneNumber":{"type":"string","description":"phone number, without any prefix"},"countryCode":{"type":"integer","description":"phone country code (i.e. 33 for France)"},"createdAt":{"type":"string","description":"date-time of the customer's creation","format":"date-time"},"referralCode":{"type":"string","description":"the referral code of a customer"}},"required":["bankAlreadyConnected","customerId","scanEnable","registered","createdAt"],"example":{"application/json":[{"customerId":"c5562d40-be8b-43cf-88ca-96933e76629f","firstName":"John","bankAlreadyConnected":true,"email":"foo@bar.com","phoneVerified":true,"registered":true,"createdAt":"2018-10-19T16:07:05.887Z"}]}},"GetStoreTransactionsResponse":{"type":"array","items":{"type":"object","title":"Transaction","properties":{"date":{"type":"string","description":"transaction date, in full-date format of RFC3339","format":"date"},"amount":{"type":"number","description":"transaction amount","format":"float"},"currency":{"type":"string","description":"transaction's currency in ISO_4217 format","minLength":3,"maxLength":3}},"required":["date","amount","currency"]}},"GetStoreResponse":{"type":"object","title":"GetStoresResponse","properties":{"storeId":{"type":"string","description":"store id"},"storeName":{"type":"string","description":"store's name"},"retailerName":{"type":"string","description":"retailer's name"},"retailerId":{"type":"string","description":"retailer id"},"cityName":{"type":"string","description":"city's name"},"streetNumber":{"type":"string","description":"street's number"},"route":{"type":"string","description":"adress route"},"country":{"type":"string","description":"country"},"googlePlaceId":{"type":"string","description":"google place id"},"shoppingHubName":{"type":"string","description":"shopping hub's name"},"isOnline":{"type":"boolean","description":"true if it's an online (web) store, false for a brick and mortar"},"inProgram":{"type":"boolean","description":"true if the store is part of the program, false otherwise"},"numberOfClaims":{"type":"number","description":"number of claims"},"numberOfStoresFromSameRetailer":{"type":"number","description":"number of stores from same retailer"},"numberOfStoresFromSameRetailerInCity":{"type":"number","description":"number of stores from same retailer in city"},"numberOfStoresFromSameRetailerInCityWithoutStrongPattern":{"type":"number","description":"number of stores from same retailer in city without strong pattern"},"transactionPatterns":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"pattern":{"type":"string","description":"store's pattern"}}}}},"required":["storeId","storeName"]},"GetRetailerResponse":{"type":"object","title":"retailerInfo","properties":{"retailerId":{"type":"string","description":"retailer id"},"retailerName":{"type":"string","description":"retailer's name"},"storeCount":{"type":"number","description":"retailer's related stores count"},"transactionCount":{"type":"number","description":"retailer's related transactions count"},"affectedTransactionCount":{"type":"number","description":"retailer's related and affected transactions count"}},"required":["retailerId","retailerName"]},"GetRetailerPatternsResponse":{"type":"array","title":"retailerPatternsInfo","items":{"type":"object","properties":{"id":{"type":"string"},"pattern":{"type":"string","description":"retailer's pattern"},"retailerId":{"type":"string","description":"retailer id"}}}},"GetRetailerStoresResponse":{"type":"array","title":"retailerStoresInfo","items":{"type":"object","properties":{"storeId":{"type":"string"},"storeName":{"type":"string","description":"store's name"},"locality":{"type":"string","description":"store's locality/city"},"cityId":{"type":"string","description":"store's city id"},"formattedAddress":{"type":"string","description":"store's formatted address"},"shoppingHub":{"type":"object","properties":{"name":{"type":"string","description":"store's hub name"}}},"isOnline":{"type":"boolean","description":"true if it's an online (web) store, false for a brick and mortar"}}}},"GetRetailerTransactionsResponse":{"type":"array","title":"retailerTransactionsInfo","items":{"type":"object","properties":{"amount":{"type":"string","description":"transaction's amount"},"id":{"type":"string","description":"transaction's id"},"transactionDate":{"type":"string","description":"date of the transaction","format":"date"},"label":{"type":"string","description":"transaction's label"},"storeAssociationOrigin":{"type":"string","description":"transaction association origin"},"city":{"type":"string","description":"transaction's city"},"bankAccount":{"type":"object","properties":{"id":{"type":"string","description":"transaction's bankAccount id"},"bank":{"type":"object","properties":{"id":{"type":"string","description":"transaction's bank id"},"name":{"type":"string","description":"transaction's bank name"}}}}},"store":{"type":"object","properties":{"id":{"type":"string","description":"transaction's store id"},"name":{"type":"string","description":"transaction's store name"},"shoppingHub":{"type":"object","properties":{"id":{"type":"string","description":"transaction's shoppingHub id"},"name":{"type":"string","description":"transaction's bank name"}}}}}}}},"GetChallengesResponse":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"challenge identifier"},"startDate":{"type":"string","description":"challenge start date-time, in full-date format of RFC3339","format":"date-time"},"endDate":{"type":"string","description":"challenge end date-time, in full-date format of RFC3339","format":"date-time"},"name":{"type":"string","description":"name of the challenge"},"teaser":{"type":"string","description":"teaser of the challenge"},"rewardType":{"type":"string","description":"challenge's type"},"rewardLabel":{"type":"string","description":"reward label of the challenge"},"rewardValue":{"type":"string","description":"reward value of the challenge"},"conditionLabel":{"type":"string","description":"condition to unlock the reward"},"legalConditionText":{"type":"string","description":"displayable condition text"},"active":{"type":"boolean","description":"challenge still active or not"},"createdAt":{"type":"string","description":"challenge creation date-time, in date-time format of RFC3339","format":"date-time"}},"required":["id","startDate","endDate","teaser","rewardType","rewardLabel","rewardValue","conditionLabel","createdAt"]}},"GetChallengesError":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of challenges API's\n* `invalidShoppingHubId` - Shopping hub identifier is invalid\n","enum":["invalidShoppingHubId"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"PostChallengesError":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of challenges API's\n* `invalidShoppingHubId` - Shopping hub identifier is invalid\n* `shoppingHubNotFound` - Shopping Hub not found\n* `challengeAlreadyExist` - Challenge already exists\n* `cappingLimitTooSmall` - Offer budget limit cannot be less then the reward\n","enum":["invalidShoppingHubId","shoppingHubNotFound","challengeAlreadyExist"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"PatchChallengesError":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of challenges API's\n* `invalidChallengeId` - Challenge identifier is invalid\n* `nothingToPatch` - No challenge attributes to patch was provided\n* `challengeNotFound` - Challenge not found\n* `challengeAlreadyExist` - Challenge already exists\n* `challengeAlreadyStarted` - Cannot change parameter for already active challenge\n* `cappingLimitTooSmall` - Offer budget limit cannot be less then the reward\n","enum":["invalidChallengeId","nothingToPatch","challengeNotFound","challengeAlreadyExist","challengeAlreadyStarted"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"DeleteChallengesError":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of challenges API's\n* `invalidChallengeId` - Challenge identifier is invalid\n* `challengeNotFound` - Challenge not found\n","enum":["invalidChallengeId","challengeNotFound"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"GetChallengeError":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of challenges API's\n* `invalidChallengeId` - Invalid challenge id parameter\n","enum":["invalidChallengeId"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"GetShoppingHubError":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of challenges API's\n* `requiredParameter` - At least one parameter is required\n","enum":["requiredParameter"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"Transaction":{"type":"object","title":"Transaction","properties":{"date":{"type":"string","description":"transaction date, in full-date format of RFC3339","format":"date"},"amount":{"type":"number","description":"transaction amount","format":"float"},"currency":{"type":"string","description":"transaction's currency in ISO_4217 format","minLength":3,"maxLength":3}},"required":["date","amount","currency"]},"Store":{"type":"object","title":"Store","properties":{"id":{"type":"string","description":"store identifier in shopping hub repository"},"name":{"type":"string","description":"store name"}},"required":["id","name"]},"ShoppingHub":{"type":"object","title":"Shopping hub","properties":{"id":{"type":"string","description":"Shopping hub identifier"},"name":{"description":"the shopping hub Owner Name"},"shortcut":{"description":"the shortcut"},"streetNumber":{"description":"the street Number"},"streetName":{"description":"the street Name"},"postalCode":{"description":"the postalCode"},"city":{"description":"the city"},"formattedAddress":{"description":"the formatted Address"},"country":{"description":"the country"},"longitude":{"description":"the longitude"},"latitude":{"description":"the latitude"},"timezone":{"type":"string","description":"the shopping hub local timezone"},"shoppingHubOwnerId":{"type":"string","description":"the shopping Hub Owner Id"},"cityId":{"type":"string","description":"the city Id"},"programLaunchDate":{"description":"the program Launch Date"},"mgUserId":{"description":"the mg User Id"},"mgWalletId":{"description":"the mg Wallet Id"},"smsSenderName":{"description":"the sms Sender Name","maxLength":11},"selpBarcodePrefix":{"type":"string","description":"SELP voucher barcode prefix"},"selpPngPrefix":{"type":"string","description":"SELP voucher PNG image prefix"},"selpHtmlPrefix":{"type":"string","description":"SELP voucher HTML display prefix"},"selpPdfPrefix":{"type":"string","description":"SELP voucher PDF prefix"},"selpWalletPrefix":{"type":"string","description":"SELP wallet prefix for code insertion"},"programName":{"description":"the program Name"},"recaptchaSecret":{"description":"the recaptcha Secret"},"recaptchaSiteKey":{"description":"the recaptcha siteKey"},"baseline":{"description":"the baseline (main description)"},"webServiceId":{"description":"the web Service Id"},"mainLanguage":{"description":"the main Language"},"googlePlaceId":{"description":"the google Place Id"},"phoneRequired":{"type":"boolean","description":"the phone is Required"},"emailRequired":{"type":"boolean","description":"the email is Required"},"customerExternalIdRequired":{"type":"boolean","description":"the customer external id is Required"},"externalId":{"description":"the external Id"},"cardRestaurantEnable":{"type":"boolean","description":"The card restaurant is enabled"},"googleAnalyticsId":{"description":"the google anlytics Id"},"hasExternalFront":{"type":"boolean","description":"true if shopping hub has an external interface implementation, false otherwise"},"scanEnable":{"type":"boolean","description":"Determine if scan feature is enable for shopping hub"},"scanConditions":{"type":"string","description":"scan conditions for program offer"},"programOffer":{"type":"string","description":"loyalty program offer description"},"hotjarId":{"description":"the hotjar Id"},"zendeskId":{"description":"the zendesk Id"},"favicon_url":{"description":"The favicon url"},"logo_url":{"description":"The logo url"},"host":{"description":"The host"},"contactEmail":{"description":"The contact email"},"supportContactEmail":{"description":"The support contact email"},"currency":{"description":"hub's currency in ISO_4217 format","minLength":3,"maxLength":3},"propertyManager":{"description":"The property manager of the hub"},"shoppingHubStyle":{"type":"object","properties":{"id":{"type":"string","description":"the shopping hub style id"},"shoppingHubId":{"type":"string","description":"shoppingHub id"},"colorPrimary":{"description":"The primary color"},"colorSecondary":{"description":"The secondary color"},"colorBackground":{"description":"The background color"},"colorComponent":{"description":"The component color"},"css":{"description":"css style. Must be a string containing the different classes to update"},"fontColor":{"description":"The font color"},"fontColorOverPrimary":{"description":"The font color over the primary one"}}},"shoppingHubOwner":{"type":"object","properties":{"id":{"type":"string","description":"the shopping hub owner id"},"name":{"type":"string","description":"the shoppingHub owner name"},"shortcut":{"type":"string","description":"the shoppingHub owner shortcut"},"transactionActivitiesIsDisplayed":{"type":"boolean","description":"true if the transactions in the customer area are shown"}}},"dataRetrievalMethod":{"description":"return which method of data retrieval will be proposed to the end-users of this program to get their data\nCodes:\n* `paymentCard` - filter Account Linking users who joined the program by linking their bank account via a PSD2 onboarding or users who joined the program by linking their payment card\n* `scan` - filter users who manually scan of their purchase receipt as part of the program\n","type":"array","items":{"type":"string","enum":["paymentCard","scan"]}},"walletNotificationThreshold":{"type":"integer"},"wallet2id":{"type":"string"},"checkout2id":{"type":"string"},"missingMandatoryFields":{"type":"array","description":"list of missing mandatory fields before going live","items":{"type":"string"}},"claimMinimumAmount":{"type":"integer"},"walletBalance":{"type":"integer"},"walletCurrency":{"type":"string"}},"required":["id"]},"GetJobTitlesResponse":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Job title identifier"},"translation_key":{"type":"string","description":"Translation key of the job title"}}}},"JobTitle":{"type":"object","properties":{"id":{"type":"string","description":"Job title identifier"},"translation_key":{"type":"string","description":"Translation key of the job title"}}},"GetCompanyIndustriesResponse":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Company industry identifier"},"code":{"type":"string","description":"Translation code of the company industry"},"icon":{"type":"string","description":"Image/svg file containing the icon to display"}}}},"CompanyIndustry":{"type":"object","properties":{"id":{"type":"string","description":"Company industry identifier"},"code":{"type":"string","description":"Translation code of the company industry"},"icon":{"type":"string","description":"Image/svg file containing the icon to display"}}},"Challenge":{"type":"object","properties":{"id":{"type":"string","description":"challenge identifier"},"startDate":{"type":"string","description":"challenge start date-time, in full-date format of RFC3339","format":"date-time"},"endDate":{"type":"string","description":"challenge end date-time, in full-date format of RFC3339","format":"date-time"},"name":{"type":"string","description":"name of the challenge"},"teaser":{"type":"string","description":"teaser of the challenge"},"rewardType":{"type":"string","description":"challenge's type"},"rewardLabel":{"type":"string","description":"reward label of the challenge"},"rewardValue":{"type":"string","description":"reward value of the challenge"},"conditionLabel":{"type":"string","description":"condition to unlock the reward"},"legalConditionText":{"type":"string","description":"displayable condition text"},"active":{"type":"boolean","description":"challenge still active or not"},"createdAt":{"type":"string","description":"challenge creation date-time, in date-time format of RFC3339","format":"date-time"}},"required":["id","startDate","endDate","teaser","rewardType","rewardLabel","rewardValue","conditionLabel","createdAt"]},"GetPhoneCountries":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","description":"country"},"code":{"type":"string","description":"country iso code (2 letters)"}}},"example":{"application/json":[[{"label":"Pologne (Polska)","code":"PL"}]]}},"PushedTransactionsResponse":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"identifier of the transaction"},"amount":{"type":"number","description":"transaction amount","format":"float"}}},"example":{"application/json":[[{"id":"3275ffc5-f1dd-435e-8757-1d293ff1e832","amount":"-40.17"}]]}},"PushedTransactionsError":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of GET /transactions/pushedToHub\n* `invalidPeriod` - Invalid startDate or endDate\n","enum":["invalidPeriod"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"PushedCashbacksResponse":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"identifier of the cashback"},"intermediateStatus":{"type":"string","description":"intermediate state of the cashback","enum":["SUCCEEDED","FAILED"]},"intermediateStatusDate":{"type":"string","description":"intermediate state was pushed to hub date","format":"date"},"finalStatus":{"type":"string","description":"final state of the cashback","enum":["RECEIVED","REJECTED"]},"finalStatusDate":{"type":"string","description":"final state was pushed to hub date","format":"date"}}},"example":{"application/json":[[{"id":"234123","intermediateStatus":"SUCCEEDED","intermediateStatusDate":"2017-01-09","finalStatus":"RECEIVED","finalStatusDate":"2017-01-09"}]]}},"PushedCashbacksError":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of GET /cashbacks/pushedToHub\n* `invalidPeriod` - Invalid startDate or endDate\n","enum":["invalidPeriod"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"AdminBankConnectionUpdateRequest":{"type":"object","properties":{"simulateInvalidCredentials":{"type":"boolean","description":"true to simulate an invalidCredentials error on this bank connection, false to do nothing"}}},"AdminCustomersResponse":{"type":"array","items":{"type":"object","properties":{"customerId":{"type":"string","description":"identifier of the customer"},"externalId":{"type":"string","description":"external identifier of the customer"},"registrationDate":{"type":"string","description":"customer's registration date","format":"date"},"registrationType":{"type":"string","description":"type of the registration","enum":["receipt","bank"]}}},"example":{"application/json":[[{"customerId":"0e67d4d5-e11d-4766-966c-d3d15b2acfb6","customerExternalId":"56591974","registrationDate":"2019-04-30T06:09:35.309Z","registrationType":"BANK"}]]}},"AdminCustomersError":{"type":"object","properties":{"code":{"type":"string","description":"Error codes of GET /admin/customers\n* `invalidPeriod` - Invalid startDate or endDate\n","enum":["invalidPeriod"]},"message":{"type":"string","description":"a short error description"}},"required":["code","message"]},"CustomerRecommendationsRequest":{"type":"object","properties":{"customers":{"description":"a list of customers external ids","type":"array","items":{"type":"string"}},"dataRetrievalMethod":{"description":"filter users based on the way we collect their data.\nCodes:\n* `paymentCard` - filter users who joined the program by linking their payment card\n* `scan` - filter users who manually scan of their purchase receipt as part of the program\n","type":"string","enum":["paymentCard","scan"]},"status":{"description":"whether users bank connections are synchronized or desynchronized. If a user has multiple bank connections, he will be counted as desynchronised if one of his bank connections is desynchronised","type":"string","enum":["synchronized","desynchronized"]},"registered":{"description":"true for users who has finished registration in the system, false for those who are not yet finished the registration process.","type":"boolean"}}},"CustomerRecommendationsResponse":{"type":"array","items":{"type":"object","properties":{"customerId":{"type":"string","description":"customer external id"},"retailers":{"description":"A list of recommended retailers ids","type":"array","items":{"type":"string","description":"retailer id"}}}}},"CustomerRecommendationsError":{"type":"object","properties":{"code":{"type":"string","description":"error code"},"message":{"type":"string","description":"a short error description"}}},"ResendInvitationError":{"type":"object","properties":{"code":{"type":"string","description":"error code"},"message":{"type":"string","description":"Error codes of POST /backoffice/admin/users/resend\n* `registrationComplete` - The user registration process is already complete, no need to resend invitation email\n* `invalidCaptcha` - provided captcha is invalid\n","enum":["registrationComplete","invalidCaptcha"]}},"required":["code","message"]},"Customer":{"type":"object","properties":{"id":{"type":"string"},"externalId":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"registrationDate":{"type":"string","format":"date","description":"Registration date with Spaycial (not the externalized registration)"},"shoppingHub":{"type":"string"},"dataRetrievalMethod":{"type":"string"},"isActive":{"type":"boolean"},"numberOfRewards":{"type":"number"},"totalRewardsAmount":{"type":"number"},"hasTransactions":{"type":"boolean"}}},"CustomerList":{"type":"object","properties":{"totalItems":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"externalId":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"registrationDate":{"type":"string","format":"date","description":"Registration date with Spaycial (not the externalized registration)"},"shoppingHub":{"type":"string"},"dataRetrievalMethod":{"type":"string"},"isActive":{"type":"boolean"},"numberOfRewards":{"type":"number"},"totalRewardsAmount":{"type":"number"},"hasTransactions":{"type":"boolean"}}}}}},"CustomerPersonalInformation":{"type":"object","properties":{"id":{"type":"string"},"firstName":{"type":"string"},"lastName":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string"},"createdAt":{"type":"string","format":"date"},"cashbackMethod":{"type":"array","items":{"type":"string","enum":["iban","credit_card"]}},"onboardingMethod":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","enum":["scan","al","cl"]},"active":{"type":"boolean"}}}},"banks":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"connected":{"type":"boolean"}}}},"loyaltyPoints":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string"},"value":{"type":"string"},"operation_date":{"type":"string","format":"date"}}}}}},"AudienceKpiResponse":{"type":"object","properties":{"members":{"type":"object","properties":{"withoutTransaction":{"type":"number","description":"number of members without associated transactions"},"withTransaction":{"type":"number","description":"number of members with associated transactions"}}},"distribution":{"type":"object","properties":{"accountLinking":{"type":"number","description":"number of members using account linking"},"scan":{"type":"number","description":"number of members using scan"},"cardLinking":{"type":"number","description":"number of members using card linking"}}},"averageBasket":{"type":"object","properties":{"value":{"type":"number","description":"average basket over the last month"},"increasing":{"type":"boolean"}}},"purchaseFrequency":{"type":"object","properties":{"value":{"type":"number","description":"average number of visits per user"},"increasing":{"type":"boolean"}}},"overallBudget":{"type":"object","properties":{"value":{"type":"number","description":"average of the amount spent in the program per user"},"increasing":{"type":"boolean"}}}},"required":["members","averageBasket","purchaseFrequency","overallBudget"]},"ShopperProfileSegmentsResponse":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"id of the segment"},"name":{"type":"string","description":"name of the segment"},"totalSpendInMall":{"type":"number","description":"money spend inside the program"},"totalSpendOutsideMall":{"type":"number","description":"money spend outside the program"},"shoppingHabits":{"type":"array","minItems":7,"maxItems":7,"items":{"type":"number","description":"customer's visit count per days (0 = monday)"}}}}},"ShopperProfileKpisResponse":{"type":"object","properties":{"averageBasketPerShoppingSession":{"type":"number"},"monthlyShoppingSession":{"type":"number"},"spentForRewards":{"type":"number"},"totalRewardValue":{"type":"number"},"storeWithPurchasePerShoppingSession":{"type":"number"},"distinctVisitedStore":{"type":"number"},"purchaseIntent":{"type":"number","description":"purchase intent within the next 7 days"},"favoriteStores":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"storeName":{"type":"string"},"averageBasket":{"type":"number"},"overallBudget":{"type":"number"}}}}}},"PurchaseHistoryResponse":{"type":"object","properties":{"count":{"type":"number","description":"Total number of purchases"},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"transaction_date":{"type":"string"},"amount":{"type":"number"},"store":{"type":"string"}}}}}},"PinpointTransactionResponse":{"type":"object","properties":{"count":{"type":"number","description":"Total number of transactions"},"rows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"transaction_date":{"type":"string"},"amount":{"type":"number"},"label":{"type":"string"},"store_name":{"type":"string"},"retailer_name":{"type":"string"}}}}}},"SendWebhookCustomerTransactions":{"type":"object","properties":{"minTransactions":{"type":"integer","description":"Minimum number of generated transactions (inclusive)","default":3,"minimum":1},"maxTransactions":{"type":"integer","description":"Maximum number of generated transactions (inclusive)","default":3,"minimum":1},"customersExternalIds":{"type":"array","description":"List of external customer identifiers used randomly in generated transactions","minItems":1,"items":{"type":"string"}},"purchaseLocationsExternalIds":{"type":"array","description":"List of purchase locations external identifiers used randomly in generated transactions","minItems":1,"items":{"type":"string"}},"currency":{"type":"string","description":"Transactions currency in ISO_4217 format","minLength":3,"maxLength":3,"default":"EUR"}},"required":["customersExternalIds","purchaseLocationsExternalIds"]},"SendWebhookBankConnectionsUpdateV2":{"type":"object","properties":{"eventType":{"type":"string","description":"Type of event between create, update or delete","enum":["create","update","delete"]},"customerExternalId":{"type":"string","description":"The client's customer id"},"connectionId":{"type":"string","description":"The Spaycial's bank connection id, generated if not specified"},"errorCode":{"type":"string","description":"The error code from the data provider","enum":["psd2ConnectionInvalid","psd2ConnectionExpired","invalidCredentials"]},"bank":{"type":"string","description":"The bank name of the bank connection","default":"Boursorama"},"accounts":{"type":"array","description":"Optional list of bank accounts to include on the connection (id and accountHash per account, for joint-account testing)","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"Spaycial bank account id"},"accountHash":{"type":"string","description":"Opaque hash of the account IBAN (nullable)"}}}}},"required":["eventType","customerExternalId"]}},"securityDefinitions":{"apiKey":{"type":"apiKey","in":"header","name":"Api-Key","description":"Api key to use the Spaycial API (provided to you by email)"},"technicalApiKey":{"type":"apiKey","x-private":true,"in":"header","name":"Api-Key","description":"Api key to use technical routes of the Spaycial API"},"JWT":{"type":"apiKey","in":"header","name":"Authorization","description":"Access token required to access API, except for registration (value: `Bearer XXX` where `XXX`=token value)\n"},"registrationJWT":{"type":"apiKey","in":"header","name":"Authorization","description":"Registration access token required to access registration API (value: `Bearer XXX` where `XXX`=token value)\n"},"signature":{"type":"apiKey","in":"header","name":"Signature","description":"Signature header to authenticate through API as a service (see Introduction)"},"captcha":{"type":"apiKey","in":"header","name":"captcha","description":"google recaptcha code"}},"security":[{"apiKey":[],"JWT":[]}],"tags":[{"name":"bank","description":"bank operations"},{"name":"auth","description":"authentication operations"},{"name":"customer","description":"customer related services"},{"name":"country","description":"operations related to countries"},{"name":"cashback","description":"operations related to cashback"},{"name":"shoppingHub","description":"shopping hub operations"},{"name":"challenges","description":"operations related to challenges"},{"name":"transaction","description":"operations related to transactions"}]}