openapi: 3.0.3 info: title: 'Obypay public API' description: 'Obypay public API' version: 1.0.0 servers: - url: 'https://public-api-obypay.obypay.net' paths: /api/v1/me: get: summary: 'Get account data' operationId: getAccountData description: '' parameters: [] responses: 200: description: 'Product in stock' content: application/json: schema: type: object example: status: 200 code: OK data: location: address: address: '2 rue tutu' zipcode: '02000' city: Truc country: FR id: LXlgVPQ6YF identification: '12343' name: 'Restaurant du coin' phone: '0647562364' company: address: address_line_1: '' address_line_2: '2 rue tutu' zipcode: '02000' city: Truc country: FR id: 65202297ad79358c12090af4 identification: '12345678900015' name: 'Société Lala SARL' properties: status: type: integer example: 200 code: type: string example: OK data: type: object properties: location: type: object properties: address: type: object properties: address: type: string example: '2 rue tutu' zipcode: type: string example: '02000' city: type: string example: Truc country: type: string example: FR id: type: string example: LXlgVPQ6YF identification: type: string example: '12343' name: type: string example: 'Restaurant du coin' phone: type: string example: '0647562364' company: type: object properties: address: type: object properties: address_line_1: type: string example: '' address_line_2: type: string example: '2 rue tutu' zipcode: type: string example: '02000' city: type: string example: Truc country: type: string example: FR id: type: string example: 65202297ad79358c12090af4 identification: type: string example: '12345678900015' name: type: string example: 'Société Lala SARL' tags: - 'Administrative API' /api/v1/auth/tokens/renew: post: summary: 'Renew an existing token' operationId: renewAnExistingToken description: '' parameters: [] responses: 200: description: 'Token renew' content: application/json: schema: type: object example: status: 200 code: OK data: token: abcdefgh|ijklmnopqrstuvwxyz0123456789 properties: status: type: integer example: 200 code: type: string example: OK data: type: object properties: token: type: string example: abcdefgh|ijklmnopqrstuvwxyz0123456789 400: description: "Can't delete current token" content: application/json: schema: type: object example: status: 400 code: 'Bad Request' errors: - "Can't delete record" properties: status: type: integer example: 400 code: type: string example: 'Bad Request' errors: type: array example: - "Can't delete record" items: type: string 404: description: 'Unknown token' content: application/json: schema: type: object example: status: 404 code: 'Not Found' errors: - 'Unknown record' properties: status: type: integer example: 404 code: type: string example: 'Not Found' errors: type: array example: - 'Unknown record' items: type: string tags: - 'Auth API' /api/v1/inventories: post: summary: 'Upload full inventory' operationId: uploadFullInventory description: "You can upload your inventory\n\n" parameters: [] responses: { } tags: - 'Inventory API' requestBody: required: false content: application/json: schema: type: object properties: config: type: object description: '' example: [] nullable: false properties: lang: type: string description: '' example: fr nullable: false enum: - fr modifiers: type: array description: '' example: - [] items: type: object properties: id: type: string description: '' example: dolorem nullable: false label: type: string description: '' example: impedit nullable: false min: type: integer description: 'Must be at least 0.' example: 62 nullable: false max: type: integer description: 'Must be at least 1.' example: 90 nullable: false multiple: type: boolean description: '' example: false nullable: false items: type: array description: '' example: - [] items: type: object properties: id: type: string description: '' example: velit nullable: false label: type: string description: '' example: exercitationem nullable: false max: type: integer description: 'Must be at least 1.' example: 87 nullable: false prices: type: array description: '' example: null items: type: object properties: type: type: string description: '' example: takeaway nullable: false enum: - onsite - takeaway - delivery value: type: integer description: '' example: 7 nullable: false required: - type - value required: - id - label - max required: - id - label - min - max - multiple - items containers: type: array description: '' example: - [] items: type: object properties: id: type: string description: '' example: reiciendis nullable: false label: type: string description: '' example: amet nullable: false items: type: object description: '' example: [] nullable: false properties: { } required: - id - label - items pagers: type: array description: '' example: - [] items: type: object properties: id: type: string description: '' example: ipsam nullable: false label: type: string description: '' example: aut nullable: false color: type: string description: '' example: voluptas nullable: false type: type: string description: '' example: all nullable: false enum: - paper - all - device required: - id - label - color - type tagsets: type: array description: '' example: - [] items: type: object properties: id: type: string description: '' example: veniam nullable: false label: type: string description: '' example: temporibus nullable: false items: type: array description: '' example: - [] items: type: object properties: id: type: string description: '' example: similique nullable: false label: type: string description: '' example: maiores nullable: false picture: type: string description: 'Must be a valid URL.' example: 'http://haley.info/aut-repellat-explicabo-qui-voluptatum-nihil-nisi' nullable: false required: - id - label required: - id - label - items products: type: array description: '' example: - [] items: type: object properties: description: type: string description: 'Must not be greater than 500 characters.' example: 'Qui impedit cumque ad expedita.' nullable: false id: type: string description: '' example: deleniti nullable: false label: type: string description: '' example: consequatur nullable: false prices: type: array description: '' example: - [] items: type: object properties: type: type: string description: '' example: delivery nullable: false enum: - onsite - takeaway - delivery value: type: integer description: '' example: 6 nullable: false vat_rate: type: string description: 'Must be at least 0 characters. Must not be greater than 1 character.' example: w nullable: false required: - type - value - vat_rate size: type: object description: '' example: null nullable: false properties: unit: type: string description: '' example: kg nullable: false enum: - unit - cl - dl - l - g - kg value: type: string description: 'Must be at least 0 characters. Must not be greater than 5000 characters.' example: mcwxctjmjlcjwuf nullable: false types: type: object description: '' example: [] nullable: false properties: { } level: type: integer description: '' example: 4 nullable: false picture: type: string description: 'Must be a valid URL.' example: 'https://www.moen.org/molestiae-fugit-soluta-numquam-aut-rerum-veniam-vel-reiciendis' nullable: false modifiers: type: object description: '' example: null nullable: false properties: { } pager_id: type: string description: '' example: quae nullable: false tagsets: type: array description: '' example: null items: type: object properties: id: type: string description: '' example: fugit nullable: false items: type: object description: '' example: null nullable: false properties: { } required: - id weekly_schedule: type: array description: '' example: null items: type: object properties: day: type: integer description: 'Must be at least 0. Must not be greater than 6.' example: 3 nullable: false openings: type: array description: '' example: null items: type: object properties: from: type: string description: 'Must match the regex /[0-9]{2}:[0-9]{2}/.' example: '33:34' nullable: false to: type: string description: 'Must match the regex /[0-9]{2}:[0-9]{2}/.' example: '99:94' nullable: false required: - id - label - prices - types productsets: type: array description: '' example: - [] items: type: object properties: id: type: string description: '' example: similique nullable: false label: type: string description: '' example: occaecati nullable: false prices: type: array description: '' example: - [] items: type: object properties: type: type: string description: '' example: takeaway nullable: false enum: - onsite - takeaway - delivery value: type: integer description: '' example: 5 nullable: false vat_rate: type: string description: 'Must be at least 0 characters. Must not be greater than 1 character.' example: g nullable: false required: - type - value - vat_rate types: type: object description: '' example: [] nullable: false properties: { } level: type: integer description: '' example: 19 nullable: false picture: type: string description: 'Must be a valid URL.' example: 'http://www.raynor.com/sit-repellat-excepturi-consequuntur-veniam' nullable: false weekly_schedule: type: array description: '' example: null items: type: object properties: day: type: integer description: 'Must be at least 0. Must not be greater than 6.' example: 1 nullable: false openings: type: array description: '' example: null items: type: object properties: from: type: string description: 'Must match the regex /[0-9]{2}:[0-9]{2}/.' example: '50:60' nullable: false to: type: string description: 'Must match the regex /[0-9]{2}:[0-9]{2}/.' example: '53:46' nullable: false steps: type: array description: '' example: - [] items: type: object properties: id: type: string description: '' example: ipsam nullable: false label: type: string description: '' example: ipsum nullable: false min: type: integer description: 'Must be at least 1. Must not be greater than 20.' example: 14 nullable: false max: type: integer description: 'Must be at least 1. Must not be greater than 20.' example: 1 nullable: false free: type: integer description: 'Must be at least 0. Must not be greater than 20.' example: 20 nullable: false items: type: array description: '' example: null items: type: object properties: id: type: string description: '' example: sit nullable: false extra_price: type: integer description: '' example: 18 nullable: false required: - id - extra_price required: - id - label - min - max - free required: - id - label - types - steps menus: type: array description: '' example: - [] items: type: object properties: id: type: string description: '' example: sed nullable: false label: type: string description: '' example: eos nullable: false families: type: array description: '' example: - [] items: type: object properties: id: type: string description: '' example: enim nullable: false label: type: string description: '' example: iure nullable: false families: type: array description: '' example: - [] items: type: object properties: id: type: string description: '' example: natus nullable: false label: type: string description: '' example: ratione nullable: false families: type: array description: '' example: - [] items: type: object properties: { id: { type: string, description: '', example: et, nullable: false }, label: { type: string, description: '', example: magnam, nullable: false }, items: { type: array, description: '', example: [[]], items: { type: object, properties: { id: { type: string, description: '', example: dolor, nullable: false }, type: { type: string, description: '', example: products, nullable: false, enum: [products, productsets, containers] }, prices: { type: array, description: '', example: null, items: { type: object, properties: { type: { type: string, description: '', example: takeaway, nullable: false, enum: [onsite, takeaway, delivery] }, value: { type: integer, description: '', example: 11, nullable: false }, vat_rate: { type: string, description: 'Must be at least 0 characters. Must not be greater than 1 character.', example: f, nullable: false } }, required: [type, value, vat_rate] } } }, required: [id, type] } } } required: [id, label] required: - id - label - families required: - id - label - families required: - id - label - families get: summary: 'Download full inventory' operationId: downloadFullInventory description: 'You can download your last successful inventory' parameters: [] responses: 500: description: '' content: application/json: schema: type: object example: message: 'Server Error' properties: message: type: string example: 'Server Error' tags: - 'Inventory API' /api/v1/stocks/products: post: summary: 'Manage batch of products stock' operationId: manageBatchOfProductsStock description: 'You can manage stock state for a batch of products' parameters: [] responses: 200: description: 'Product batch processed' content: application/json: schema: type: object example: status: 200 code: OK data: data: - id: '4084' in_stock: true - id: '705' in_stock: true - id: '7762' in_stock: true properties: status: type: integer example: 200 code: type: string example: OK data: type: object properties: data: type: array example: - id: '4084' in_stock: true - id: '705' in_stock: true - id: '7762' in_stock: true items: type: object properties: id: type: string example: '4084' in_stock: type: boolean example: true tags: - 'Inventory API' requestBody: required: true content: application/json: schema: type: object properties: state: type: string description: '' example: in-stock nullable: false enum: - in-stock - out-of-stock ids: type: array description: 'List of product ids to update.' example: - '4084' - '705' - '7762' items: type: string required: - state - ids '/api/v1/stocks/products/{id}': post: summary: 'Manage single product stock' operationId: manageSingleProductStock description: 'You can manage stock state for a single product' parameters: [] responses: 200: description: 'Product stock state updated' content: application/json: schema: type: object example: status: 200 code: OK data: id: CvhwGFNY3Z in_stock: true properties: status: type: integer example: 200 code: type: string example: OK data: type: object properties: id: type: string example: CvhwGFNY3Z in_stock: type: boolean example: true 404: description: 'Product not found' content: application/json: schema: type: object example: status: 404 code: 'Not Found' errors: - 'Unknown record' properties: status: type: integer example: 404 code: type: string example: 'Not Found' errors: type: array example: - 'Unknown record' items: type: string tags: - 'Inventory API' requestBody: required: true content: application/json: schema: type: object properties: state: type: string description: '' example: in-stock nullable: false enum: - in-stock - out-of-stock required: - state parameters: - in: path name: id description: 'The id of the product.' example: CvhwGFNY3Z required: true schema: type: string /api/v1/stocks/modifiers/items: post: summary: 'Manage batch of modifier items stock' operationId: manageBatchOfModifierItemsStock description: 'You can manage stock state for a batch of modifier items' parameters: [] responses: 200: description: 'Modifier item batch processed' content: application/json: schema: type: object example: status: 200 code: OK data: data: - id: '4084' in_stock: true - id: '705' in_stock: true - id: '7762' in_stock: true properties: status: type: integer example: 200 code: type: string example: OK data: type: object properties: data: type: array example: - id: '4084' in_stock: true - id: '705' in_stock: true - id: '7762' in_stock: true items: type: object properties: id: type: string example: '4084' in_stock: type: boolean example: true tags: - 'Inventory API' requestBody: required: true content: application/json: schema: type: object properties: state: type: string description: '' example: out-of-stock nullable: false enum: - in-stock - out-of-stock ids: type: array description: 'List of modifier item ids to update.' example: - 8L4DWdYahZ - 8L4DWdYaha - 8L4DWdYahd items: type: string required: - state - ids '/api/v1/stocks/modifiers/items/{id}': post: summary: 'Manage single modifier item stock' operationId: manageSingleModifierItemStock description: 'You can manage stock state for a single modifier item' parameters: [] responses: 200: description: 'Modifier item stock state updated' content: application/json: schema: type: object example: status: 200 code: OK data: id: CvhwGFNY3Z in_stock: true properties: status: type: integer example: 200 code: type: string example: OK data: type: object properties: id: type: string example: CvhwGFNY3Z in_stock: type: boolean example: true 404: description: 'Modifier item not found' content: application/json: schema: type: object example: status: 404 code: 'Not Found' errors: - 'Unknown record' properties: status: type: integer example: 404 code: type: string example: 'Not Found' errors: type: array example: - 'Unknown record' items: type: string tags: - 'Inventory API' requestBody: required: true content: application/json: schema: type: object properties: state: type: string description: '' example: in-stock nullable: false enum: - in-stock - out-of-stock required: - state parameters: - in: path name: id description: 'The id of the modifier item.' example: 8L4DWdYahZ required: true schema: type: string /api/v1/stocks/productsets: post: summary: 'Manage batch of productsets stock' operationId: manageBatchOfProductsetsStock description: 'You can manage stock state for a batch of productsets' parameters: [] responses: 200: description: 'Productset batch processed' content: application/json: schema: type: object example: status: 200 code: OK data: data: - id: '4084' in_stock: true - id: '705' in_stock: true - id: '7762' in_stock: true properties: status: type: integer example: 200 code: type: string example: OK data: type: object properties: data: type: array example: - id: '4084' in_stock: true - id: '705' in_stock: true - id: '7762' in_stock: true items: type: object properties: id: type: string example: '4084' in_stock: type: boolean example: true tags: - 'Inventory API' requestBody: required: true content: application/json: schema: type: object properties: state: type: string description: '' example: in-stock nullable: false enum: - in-stock - out-of-stock ids: type: array description: 'List of productset ids to update.' example: - '21073' - '19792' - '17021' items: type: string required: - state - ids '/api/v1/stocks/productsets/{id}': post: summary: 'Manage single productset stock' operationId: manageSingleProductsetStock description: 'You can manage stock state for a single productset' parameters: [] responses: 200: description: 'Productset stock state updated' content: application/json: schema: type: object example: status: 200 code: OK data: id: CvhwGFNY3Z in_stock: true properties: status: type: integer example: 200 code: type: string example: OK data: type: object properties: id: type: string example: CvhwGFNY3Z in_stock: type: boolean example: true 404: description: 'Productset not found' content: application/json: schema: type: object example: status: 404 code: 'Not Found' errors: - 'Unknown record' properties: status: type: integer example: 404 code: type: string example: 'Not Found' errors: type: array example: - 'Unknown record' items: type: string tags: - 'Inventory API' requestBody: required: true content: application/json: schema: type: object properties: state: type: string description: '' example: out-of-stock nullable: false enum: - in-stock - out-of-stock required: - state parameters: - in: path name: id description: 'The id of the productset.' example: HzsKRTLKXo required: true schema: type: string /api/v1/notifications/listeners: post: summary: 'Create a listener' operationId: createAListener description: '' parameters: [] responses: 201: description: 'Listener created' content: application/json: schema: type: object example: status: 201 code: Created data: created_at: '2024-02-26T13:26:54+00:00' events: - order.created - order.ready - order.delivered - order.canceled id: 65dc919e67743a65790b1342 updated_at: '2024-02-26T13:26:54+00:00' url: 'https://api.docker.localhost/webhooks' properties: status: type: integer example: 201 code: type: string example: Created data: type: object properties: created_at: type: string example: '2024-02-26T13:26:54+00:00' events: type: array example: - order.created - order.ready - order.delivered - order.canceled items: type: string id: type: string example: 65dc919e67743a65790b1342 updated_at: type: string example: '2024-02-26T13:26:54+00:00' url: type: string example: 'https://api.docker.localhost/webhooks' 422: description: 'Request error' content: application/json: schema: type: object example: status: 422 code: Failed errors: - 'The events field is required.' properties: status: type: integer example: 422 code: type: string example: Failed errors: type: array example: - 'The events field is required.' items: type: string tags: - 'Notification API' requestBody: required: true content: application/json: schema: type: object properties: events: type: array description: 'List of events to subscribe to.' example: - order.created - order.ready - order.delivered - order.canceled items: type: string enum: - order.created - order.ready - order.delivered - order.canceled url: type: string description: 'The url to call.' example: 'https://example.com/webhooks' nullable: false required: - events - url get: summary: 'Get all listeners' operationId: getAllListeners description: '' parameters: [] responses: 200: description: 'Listeners retrieved' content: application/json: schema: type: object example: status: 200 code: OK data: data: - created_at: '2024-02-26T13:25:25+00:00' events: - order.created - order.ready - order.delivered - order.canceled id: 65dc91453558bb04eb03ae92 updated_at: '2024-02-26T13:25:25+00:00' url: 'https://api.docker.localhost/webhooks' properties: status: type: integer example: 200 code: type: string example: OK data: type: object properties: data: type: array example: - created_at: '2024-02-26T13:25:25+00:00' events: - order.created - order.ready - order.delivered - order.canceled id: 65dc91453558bb04eb03ae92 updated_at: '2024-02-26T13:25:25+00:00' url: 'https://api.docker.localhost/webhooks' items: type: object properties: created_at: type: string example: '2024-02-26T13:25:25+00:00' events: type: array example: - order.created - order.ready - order.delivered - order.canceled items: type: string id: type: string example: 65dc91453558bb04eb03ae92 updated_at: type: string example: '2024-02-26T13:25:25+00:00' url: type: string example: 'https://api.docker.localhost/webhooks' tags: - 'Notification API' '/api/v1/notifications/listeners/{id}': get: summary: 'Get a listener' operationId: getAListener description: '' parameters: [] responses: 200: description: 'Listener retrieved' content: application/json: schema: type: object example: status: 200 code: OK data: created_at: '2024-02-26T13:26:54+00:00' events: - order.created - order.ready - order.delivered - order.canceled id: 65dc919e67743a65790b1342 updated_at: '2024-02-26T13:26:54+00:00' url: 'https://api.docker.localhost/webhooks' properties: status: type: integer example: 200 code: type: string example: OK data: type: object properties: created_at: type: string example: '2024-02-26T13:26:54+00:00' events: type: array example: - order.created - order.ready - order.delivered - order.canceled items: type: string id: type: string example: 65dc919e67743a65790b1342 updated_at: type: string example: '2024-02-26T13:26:54+00:00' url: type: string example: 'https://api.docker.localhost/webhooks' tags: - 'Notification API' put: summary: 'Update a listener' operationId: updateAListener description: '' parameters: [] responses: 200: description: 'Listener updated' content: application/json: schema: type: object example: status: 200 code: OK data: created_at: '2024-02-26T13:26:54+00:00' events: - order.created - order.ready - order.delivered - order.canceled id: 65dc919e67743a65790b1342 updated_at: '2024-02-26T13:26:54+00:00' url: 'https://api.docker.localhost/webhooks' properties: status: type: integer example: 200 code: type: string example: OK data: type: object properties: created_at: type: string example: '2024-02-26T13:26:54+00:00' events: type: array example: - order.created - order.ready - order.delivered - order.canceled items: type: string id: type: string example: 65dc919e67743a65790b1342 updated_at: type: string example: '2024-02-26T13:26:54+00:00' url: type: string example: 'https://api.docker.localhost/webhooks' tags: - 'Notification API' requestBody: required: true content: application/json: schema: type: object properties: events: type: array description: 'List of events to subscribe to.' example: - order.created - order.ready - order.delivered - order.canceled items: type: string enum: - order.created - order.ready - order.delivered - order.canceled url: type: string description: 'The url to call.' example: 'https://example.com/webhooks' nullable: false required: - events - url delete: summary: 'Delete a listener' operationId: deleteAListener description: '' parameters: [] responses: 204: description: 'Listener deleted' tags: - 'Notification API' parameters: - in: path name: id description: 'The id of the listener.' example: 65dc91453558bb04eb03ae92 required: true schema: type: string '/api/v1/orders/{id}': get: summary: 'Get an order detail' operationId: getAnOrderDetail description: '' parameters: [] responses: 200: description: 'Order found' content: application/json: schema: type: object example: status: 200 code: OK data: clickandcollect: true clickandcollect_pickup_at: '2023-10-23T16:00:00+00:00' created_at: '2023-10-23T15:35:00+00:00' comment: '' currency: EUR currency_symbol: € customer: anonymous: true company_name: null email: anonymous-obs9xt5cQF@obypay.com firstname: anonymous id: ANON-obs9xt5cQF lang: fr lastname: anonymous phone: null due_at: '2023-10-23T16:00:00+00:00' environment: consumer-device id: obs9xt5cQF number: 20231023-2 number_short: '2' pagers: yMfoIh5Y1T: '12' price: 26.4 price_paid: 26.4 payment: amount: 26.4 created_at: '2023-10-23T15:35:00+00:00' currency: EUR currency_symbol: € id: 653692a4093117be530559c4 orders: - obs9xt5cQF sources: - amount: 10.41 id: 1 paid: true remaining_amount: 10.41 slug: card - amount: 15.99 id: 5 paid: true remaining_amount: 15.99 slug: trd status: paid updated_at: '2023-10-24T15:42:03+00:00' with_payment: true products: - discounted: false id: HzsKRTLKXo name: 'Menu burger' price: 13 price_without_discount: 13 quantity: 1 steps: - id: jv65LjnVkU name: Dessert products: - discounted: false id: gAidXnqmmV modifiers: [] name: Glaces price: 0 price_without_discount: null quantity: 1 type: product vat_rate: null - discounted: false id: 1PZavMCp5h modifiers: [] name: Cookie pager: yMfoIh5Y1T price: 0 price_without_discount: null quantity: 1 type: product vat_rate: null - id: fAk1UBE3yC name: boissons products: - discounted: false id: vjAadvBbkG modifiers: [] name: biere price: 0 price_without_discount: null quantity: 1 type: product vat_rate: null - id: drN9gdMdTx name: test products: - discounted: false id: yXmisbMpbk modifiers: - id: J7pPhzccno name: 'Extra burger' items: - { id: Mq8DE993Ah, name: 'Extra 2', quantity: 1, price: 0, external_reference: Mq8DE993Ah } external_reference: J7pPhzccno name: 'Cheese Burger' price: 0 price_without_discount: null quantity: 1 type: product vat_rate: null type: menu vat_rate: 0.1 - discounted: false id: 04HvtXgWVM modifiers: [] name: Soupe price: 3 price_without_discount: 3 quantity: 1 type: product vat_rate: 0.1 - discounted: false id: xomnPFPCMW modifiers: - id: 1haz1UnzaH name: sauces items: - id: YTwAr4hnMP name: vinaigrette quantity: 1 price: 0 external_reference: YTwAr4hnMP external_reference: 1haz1UnzaH - id: 4bxdGKuzAs name: Sauces items: - id: YtyYef9Wbb name: 'Sambal Hot Sauce' quantity: 2 price: 0 external_reference: YtyYef9Wbb external_reference: 4bxdGKuzAs - id: Md1hekAmXe name: Parfums items: - id: 8L4DWdYahZ name: Chocolat quantity: 1 price: 1.2 external_reference: 8L4DWdYahZ external_reference: Md1hekAmXe name: 'Sorbet/glace 2' price: 4 price_without_discount: 4 quantity: 2 type: product vat_rate: 0.1 seats: 1 status: delivered takeaway: onsite tip: 0 updated_at: '2023-10-24T04:00:56+00:00' with_payment: true properties: status: type: integer example: 200 code: type: string example: OK data: type: object properties: clickandcollect: type: boolean example: true clickandcollect_pickup_at: type: string example: '2023-10-23T16:00:00+00:00' created_at: type: string example: '2023-10-23T15:35:00+00:00' comment: type: string example: '' currency: type: string example: EUR currency_symbol: type: string example: € customer: type: object properties: anonymous: type: boolean example: true company_name: type: string example: null email: type: string example: anonymous-obs9xt5cQF@obypay.com firstname: type: string example: anonymous id: type: string example: ANON-obs9xt5cQF lang: type: string example: fr lastname: type: string example: anonymous phone: type: string example: null due_at: type: string example: '2023-10-23T16:00:00+00:00' environment: type: string example: consumer-device id: type: string example: obs9xt5cQF number: type: string example: 20231023-2 number_short: type: string example: '2' pagers: type: object properties: yMfoIh5Y1T: type: string example: '12' price: type: number example: 26.4 price_paid: type: number example: 26.4 payment: type: object properties: amount: type: number example: 26.4 created_at: type: string example: '2023-10-23T15:35:00+00:00' currency: type: string example: EUR currency_symbol: type: string example: € id: type: string example: 653692a4093117be530559c4 orders: type: array example: - obs9xt5cQF items: type: string sources: type: array example: - amount: 10.41 id: 1 paid: true remaining_amount: 10.41 slug: card - amount: 15.99 id: 5 paid: true remaining_amount: 15.99 slug: trd items: type: object properties: amount: type: number example: 10.41 id: type: integer example: 1 paid: type: boolean example: true remaining_amount: type: number example: 10.41 slug: type: string example: card status: type: string example: paid updated_at: type: string example: '2023-10-24T15:42:03+00:00' with_payment: type: boolean example: true products: type: array example: - discounted: false id: HzsKRTLKXo name: 'Menu burger' price: 13 price_without_discount: 13 quantity: 1 steps: - id: jv65LjnVkU name: Dessert products: - discounted: false id: gAidXnqmmV modifiers: [] name: Glaces price: 0 price_without_discount: null quantity: 1 type: product vat_rate: null - discounted: false id: 1PZavMCp5h modifiers: [] name: Cookie pager: yMfoIh5Y1T price: 0 price_without_discount: null quantity: 1 type: product vat_rate: null - id: fAk1UBE3yC name: boissons products: - discounted: false id: vjAadvBbkG modifiers: [] name: biere price: 0 price_without_discount: null quantity: 1 type: product vat_rate: null - id: drN9gdMdTx name: test products: - discounted: false id: yXmisbMpbk modifiers: - { id: J7pPhzccno, name: 'Extra burger', items: [{ id: Mq8DE993Ah, name: 'Extra 2', quantity: 1, price: 0, external_reference: Mq8DE993Ah }], external_reference: J7pPhzccno } name: 'Cheese Burger' price: 0 price_without_discount: null quantity: 1 type: product vat_rate: null type: menu vat_rate: 0.1 - discounted: false id: 04HvtXgWVM modifiers: [] name: Soupe price: 3 price_without_discount: 3 quantity: 1 type: product vat_rate: 0.1 - discounted: false id: xomnPFPCMW modifiers: - id: 1haz1UnzaH name: sauces items: - id: YTwAr4hnMP name: vinaigrette quantity: 1 price: 0 external_reference: YTwAr4hnMP external_reference: 1haz1UnzaH - id: 4bxdGKuzAs name: Sauces items: - id: YtyYef9Wbb name: 'Sambal Hot Sauce' quantity: 2 price: 0 external_reference: YtyYef9Wbb external_reference: 4bxdGKuzAs - id: Md1hekAmXe name: Parfums items: - id: 8L4DWdYahZ name: Chocolat quantity: 1 price: 1.2 external_reference: 8L4DWdYahZ external_reference: Md1hekAmXe name: 'Sorbet/glace 2' price: 4 price_without_discount: 4 quantity: 2 type: product vat_rate: 0.1 items: type: object properties: discounted: type: boolean example: false id: type: string example: HzsKRTLKXo name: type: string example: 'Menu burger' price: type: integer example: 13 price_without_discount: type: integer example: 13 quantity: type: integer example: 1 steps: type: array example: - id: jv65LjnVkU name: Dessert products: - discounted: false id: gAidXnqmmV modifiers: [] name: Glaces price: 0 price_without_discount: null quantity: 1 type: product vat_rate: null - discounted: false id: 1PZavMCp5h modifiers: [] name: Cookie pager: yMfoIh5Y1T price: 0 price_without_discount: null quantity: 1 type: product vat_rate: null - id: fAk1UBE3yC name: boissons products: - discounted: false id: vjAadvBbkG modifiers: [] name: biere price: 0 price_without_discount: null quantity: 1 type: product vat_rate: null - id: drN9gdMdTx name: test products: - discounted: false id: yXmisbMpbk modifiers: [{ id: J7pPhzccno, name: 'Extra burger', items: [{ id: Mq8DE993Ah, name: 'Extra 2', quantity: 1, price: 0, external_reference: Mq8DE993Ah }], external_reference: J7pPhzccno }] name: 'Cheese Burger' price: 0 price_without_discount: null quantity: 1 type: product vat_rate: null items: type: object properties: id: type: string example: jv65LjnVkU name: type: string example: Dessert products: type: array example: - { discounted: false, id: gAidXnqmmV, modifiers: [], name: Glaces, price: 0, price_without_discount: null, quantity: 1, type: product, vat_rate: null } - { discounted: false, id: 1PZavMCp5h, modifiers: [], name: Cookie, pager: yMfoIh5Y1T, price: 0, price_without_discount: null, quantity: 1, type: product, vat_rate: null } items: type: object properties: { discounted: { type: boolean, example: false }, id: { type: string, example: gAidXnqmmV }, modifiers: { type: array, example: [] }, name: { type: string, example: Glaces }, price: { type: integer, example: 0 }, price_without_discount: { type: string, example: null }, quantity: { type: integer, example: 1 }, type: { type: string, example: product }, vat_rate: { type: string, example: null } } type: type: string example: menu vat_rate: type: number example: 0.1 seats: type: integer example: 1 status: type: string example: delivered takeaway: type: string example: onsite tip: type: integer example: 0 updated_at: type: string example: '2023-10-24T04:00:56+00:00' with_payment: type: boolean example: true 404: description: 'Order not found' content: application/json: schema: type: object example: status: 404 code: 'Not Found' errors: - 'Unknown record' properties: status: type: integer example: 404 code: type: string example: 'Not Found' errors: type: array example: - 'Unknown record' items: type: string 422: description: 'Request error' content: application/json: schema: type: object example: status: 422 code: Failed errors: - 'The selected with is invalid.' properties: status: type: integer example: 422 code: type: string example: Failed errors: type: array example: - 'The selected with is invalid.' items: type: string tags: - 'Order API' requestBody: required: false content: application/json: schema: type: object properties: with: type: array description: 'List of extra fields to add to response.' example: - customer - payment - products items: type: string enum: - customer - payment - products parameters: - in: path name: id description: 'The id of the order.' example: obs9xt5cQF required: true schema: type: string '/api/v1/orders/{id}/states/{state}': post: summary: 'Update an order state' operationId: updateAnOrderState description: '' parameters: [] responses: 200: description: 'Order found' content: application/json: schema: type: object example: status: 200 code: OK data: clickandcollect: true clickandcollect_pickup_at: '2023-10-23T16:00:00+00:00' created_at: '2023-10-23T15:35:00+00:00' comment: '' currency: EUR currency_symbol: € customer: anonymous: true company_name: null email: anonymous-obs9xt5cQF@obypay.com firstname: anonymous id: ANON-obs9xt5cQF lang: fr lastname: anonymous phone: null due_at: '2023-10-23T16:00:00+00:00' environment: consumer-device id: obs9xt5cQF number: 20231023-2 number_short: '2' pagers: yMfoIh5Y1T: '12' price: 26.4 price_paid: 26.4 payment: amount: 26.4 created_at: '2023-10-23T15:35:00+00:00' currency: EUR currency_symbol: € id: 653692a4093117be530559c4 orders: - obs9xt5cQF sources: - amount: 10.41 id: 1 paid: true remaining_amount: 10.41 slug: card - amount: 15.99 id: 5 paid: true remaining_amount: 15.99 slug: trd status: paid updated_at: '2023-10-24T15:42:03+00:00' with_payment: true products: - discounted: false id: HzsKRTLKXo name: 'Menu burger' price: 13 price_without_discount: 13 quantity: 1 steps: - id: jv65LjnVkU name: Dessert products: - discounted: false id: gAidXnqmmV modifiers: [] name: Glaces price: 0 price_without_discount: null quantity: 1 type: product vat_rate: null - discounted: false id: 1PZavMCp5h modifiers: [] name: Cookie pager: yMfoIh5Y1T price: 0 price_without_discount: null quantity: 1 type: product vat_rate: null - id: fAk1UBE3yC name: boissons products: - discounted: false id: vjAadvBbkG modifiers: [] name: biere price: 0 price_without_discount: null quantity: 1 type: product vat_rate: null - id: drN9gdMdTx name: test products: - discounted: false id: yXmisbMpbk modifiers: - id: J7pPhzccno name: 'Extra burger' items: - { id: Mq8DE993Ah, name: 'Extra 2', quantity: 1, price: 0, external_reference: Mq8DE993Ah } external_reference: J7pPhzccno name: 'Cheese Burger' price: 0 price_without_discount: null quantity: 1 type: product vat_rate: null type: menu vat_rate: 0.1 - discounted: false id: 04HvtXgWVM modifiers: [] name: Soupe price: 3 price_without_discount: 3 quantity: 1 type: product vat_rate: 0.1 - discounted: false id: xomnPFPCMW modifiers: - id: 1haz1UnzaH name: sauces items: - id: YTwAr4hnMP name: vinaigrette quantity: 1 price: 0 external_reference: YTwAr4hnMP external_reference: 1haz1UnzaH - id: 4bxdGKuzAs name: Sauces items: - id: YtyYef9Wbb name: 'Sambal Hot Sauce' quantity: 2 price: 0 external_reference: YtyYef9Wbb external_reference: 4bxdGKuzAs - id: Md1hekAmXe name: Parfums items: - id: 8L4DWdYahZ name: Chocolat quantity: 1 price: 1.2 external_reference: 8L4DWdYahZ external_reference: Md1hekAmXe name: 'Sorbet/glace 2' price: 4 price_without_discount: 4 quantity: 2 type: product vat_rate: 0.1 seats: 1 status: delivered takeaway: onsite tip: 0 updated_at: '2023-10-24T04:00:56+00:00' with_payment: true properties: status: type: integer example: 200 code: type: string example: OK data: type: object properties: clickandcollect: type: boolean example: true clickandcollect_pickup_at: type: string example: '2023-10-23T16:00:00+00:00' created_at: type: string example: '2023-10-23T15:35:00+00:00' comment: type: string example: '' currency: type: string example: EUR currency_symbol: type: string example: € customer: type: object properties: anonymous: type: boolean example: true company_name: type: string example: null email: type: string example: anonymous-obs9xt5cQF@obypay.com firstname: type: string example: anonymous id: type: string example: ANON-obs9xt5cQF lang: type: string example: fr lastname: type: string example: anonymous phone: type: string example: null due_at: type: string example: '2023-10-23T16:00:00+00:00' environment: type: string example: consumer-device id: type: string example: obs9xt5cQF number: type: string example: 20231023-2 number_short: type: string example: '2' pagers: type: object properties: yMfoIh5Y1T: type: string example: '12' price: type: number example: 26.4 price_paid: type: number example: 26.4 payment: type: object properties: amount: type: number example: 26.4 created_at: type: string example: '2023-10-23T15:35:00+00:00' currency: type: string example: EUR currency_symbol: type: string example: € id: type: string example: 653692a4093117be530559c4 orders: type: array example: - obs9xt5cQF items: type: string sources: type: array example: - amount: 10.41 id: 1 paid: true remaining_amount: 10.41 slug: card - amount: 15.99 id: 5 paid: true remaining_amount: 15.99 slug: trd items: type: object properties: amount: type: number example: 10.41 id: type: integer example: 1 paid: type: boolean example: true remaining_amount: type: number example: 10.41 slug: type: string example: card status: type: string example: paid updated_at: type: string example: '2023-10-24T15:42:03+00:00' with_payment: type: boolean example: true products: type: array example: - discounted: false id: HzsKRTLKXo name: 'Menu burger' price: 13 price_without_discount: 13 quantity: 1 steps: - id: jv65LjnVkU name: Dessert products: - discounted: false id: gAidXnqmmV modifiers: [] name: Glaces price: 0 price_without_discount: null quantity: 1 type: product vat_rate: null - discounted: false id: 1PZavMCp5h modifiers: [] name: Cookie pager: yMfoIh5Y1T price: 0 price_without_discount: null quantity: 1 type: product vat_rate: null - id: fAk1UBE3yC name: boissons products: - discounted: false id: vjAadvBbkG modifiers: [] name: biere price: 0 price_without_discount: null quantity: 1 type: product vat_rate: null - id: drN9gdMdTx name: test products: - discounted: false id: yXmisbMpbk modifiers: - { id: J7pPhzccno, name: 'Extra burger', items: [{ id: Mq8DE993Ah, name: 'Extra 2', quantity: 1, price: 0, external_reference: Mq8DE993Ah }], external_reference: J7pPhzccno } name: 'Cheese Burger' price: 0 price_without_discount: null quantity: 1 type: product vat_rate: null type: menu vat_rate: 0.1 - discounted: false id: 04HvtXgWVM modifiers: [] name: Soupe price: 3 price_without_discount: 3 quantity: 1 type: product vat_rate: 0.1 - discounted: false id: xomnPFPCMW modifiers: - id: 1haz1UnzaH name: sauces items: - id: YTwAr4hnMP name: vinaigrette quantity: 1 price: 0 external_reference: YTwAr4hnMP external_reference: 1haz1UnzaH - id: 4bxdGKuzAs name: Sauces items: - id: YtyYef9Wbb name: 'Sambal Hot Sauce' quantity: 2 price: 0 external_reference: YtyYef9Wbb external_reference: 4bxdGKuzAs - id: Md1hekAmXe name: Parfums items: - id: 8L4DWdYahZ name: Chocolat quantity: 1 price: 1.2 external_reference: 8L4DWdYahZ external_reference: Md1hekAmXe name: 'Sorbet/glace 2' price: 4 price_without_discount: 4 quantity: 2 type: product vat_rate: 0.1 items: type: object properties: discounted: type: boolean example: false id: type: string example: HzsKRTLKXo name: type: string example: 'Menu burger' price: type: integer example: 13 price_without_discount: type: integer example: 13 quantity: type: integer example: 1 steps: type: array example: - id: jv65LjnVkU name: Dessert products: - discounted: false id: gAidXnqmmV modifiers: [] name: Glaces price: 0 price_without_discount: null quantity: 1 type: product vat_rate: null - discounted: false id: 1PZavMCp5h modifiers: [] name: Cookie pager: yMfoIh5Y1T price: 0 price_without_discount: null quantity: 1 type: product vat_rate: null - id: fAk1UBE3yC name: boissons products: - discounted: false id: vjAadvBbkG modifiers: [] name: biere price: 0 price_without_discount: null quantity: 1 type: product vat_rate: null - id: drN9gdMdTx name: test products: - discounted: false id: yXmisbMpbk modifiers: [{ id: J7pPhzccno, name: 'Extra burger', items: [{ id: Mq8DE993Ah, name: 'Extra 2', quantity: 1, price: 0, external_reference: Mq8DE993Ah }], external_reference: J7pPhzccno }] name: 'Cheese Burger' price: 0 price_without_discount: null quantity: 1 type: product vat_rate: null items: type: object properties: id: type: string example: jv65LjnVkU name: type: string example: Dessert products: type: array example: - { discounted: false, id: gAidXnqmmV, modifiers: [], name: Glaces, price: 0, price_without_discount: null, quantity: 1, type: product, vat_rate: null } - { discounted: false, id: 1PZavMCp5h, modifiers: [], name: Cookie, pager: yMfoIh5Y1T, price: 0, price_without_discount: null, quantity: 1, type: product, vat_rate: null } items: type: object properties: { discounted: { type: boolean, example: false }, id: { type: string, example: gAidXnqmmV }, modifiers: { type: array, example: [] }, name: { type: string, example: Glaces }, price: { type: integer, example: 0 }, price_without_discount: { type: string, example: null }, quantity: { type: integer, example: 1 }, type: { type: string, example: product }, vat_rate: { type: string, example: null } } type: type: string example: menu vat_rate: type: number example: 0.1 seats: type: integer example: 1 status: type: string example: delivered takeaway: type: string example: onsite tip: type: integer example: 0 updated_at: type: string example: '2023-10-24T04:00:56+00:00' with_payment: type: boolean example: true 404: description: 'Order not found' content: application/json: schema: type: object example: status: 404 code: 'Not Found' errors: - 'Unknown record' properties: status: type: integer example: 404 code: type: string example: 'Not Found' errors: type: array example: - 'Unknown record' items: type: string 422: description: 'Request error' content: application/json: schema: type: object example: status: 422 code: Failed errors: - 'The selected with is invalid.' properties: status: type: integer example: 422 code: type: string example: Failed errors: type: array example: - 'The selected with is invalid.' items: type: string tags: - 'Order API' parameters: - in: path name: id description: 'The id of the order.' example: obs9xt5cQF required: true schema: type: string - in: path name: state description: 'The new state of the order.' example: '"ready"' required: true schema: type: string /api/v1/webextensions/link: post: summary: 'Create a webextension link' operationId: createAWebextensionLink description: '' parameters: [] responses: 200: description: 'Existing Webextension link retrieved' content: application/json: schema: type: object example: status: 200 code: OK data: id: 6687f9e6788bd47a45009b42 order_id: abcdef link: 'https://domain.tld/82701d25c6d75c91f3c0cd00464a98bc5e13f628/fr?integration=generic&location_id=oUxkeGLhDg&order_id=abcdef' properties: status: type: integer example: 200 code: type: string example: OK data: type: object properties: id: type: string example: 6687f9e6788bd47a45009b42 order_id: type: string example: abcdef link: type: string example: 'https://domain.tld/82701d25c6d75c91f3c0cd00464a98bc5e13f628/fr?integration=generic&location_id=oUxkeGLhDg&order_id=abcdef' 201: description: 'Webextension link created' content: application/json: schema: type: object example: status: 201 code: Created data: id: 6687f9e6788bd47a45009b42 order_id: abcdef link: 'https://domain.tld/82701d25c6d75c91f3c0cd00464a98bc5e13f628/fr?integration=generic&location_id=oUxkeGLhDg&order_id=abcdef' properties: status: type: integer example: 201 code: type: string example: Created data: type: object properties: id: type: string example: 6687f9e6788bd47a45009b42 order_id: type: string example: abcdef link: type: string example: 'https://domain.tld/82701d25c6d75c91f3c0cd00464a98bc5e13f628/fr?integration=generic&location_id=oUxkeGLhDg&order_id=abcdef' tags: - 'Order API' requestBody: required: true content: application/json: schema: type: object properties: order: type: object description: '' example: [] nullable: false properties: amount: type: integer description: 'Must be at least 0. Must not be greater than 500000.' example: 10 nullable: false id: type: string description: '' example: sint nullable: false discounts: type: array description: '' example: null items: type: object properties: amount: type: integer description: 'Must be at least 0. Must not be greater than 500000.' example: 4 nullable: false id: type: string description: 'Must not be greater than 30 characters.' example: xkefslmon nullable: false label: type: string description: 'Must not be greater than 50 characters.' example: svvbq nullable: false required: - amount - id - label lines: type: array description: '' example: - [] items: type: object properties: label: type: string description: '' example: maxime nullable: false line_id: type: string description: '' example: rerum nullable: false product_id: type: string description: '' example: minus nullable: false quantity: type: integer description: 'Must be at least 1. Must not be greater than 100.' example: 12 nullable: false unit_price: type: integer description: 'Must be at least 0. Must not be greater than 500000.' example: 24 nullable: false modifiers: type: array description: '' example: null items: type: object properties: label: type: string description: '' example: aut nullable: false product_id: type: string description: '' example: aliquid nullable: false quantity: type: integer description: 'Must be at least 1. Must not be greater than 100.' example: 9 nullable: false unit_price: type: integer description: 'Must be at least 0. Must not be greater than 500000.' example: 9 nullable: false required: - label - product_id - quantity - unit_price required: - label - line_id - product_id - quantity - unit_price transactions: type: array description: '' example: null items: type: object properties: label: type: string description: '' example: dolor nullable: false amount: type: number description: 'Must be at least 0.' example: 64 nullable: false required: - label - amount loyalty: type: object description: '' example: [] nullable: false properties: id: type: string description: 'Must be 46 characters.' example: fmrthxlukhbsecneltpodfzvukneycgtbplzlpfwknlwkr nullable: false required: - order /api/v1/payments/instruments: get: summary: 'Display instruments' operationId: displayInstruments description: 'Display configured instruments' parameters: [] responses: 200: description: 'Payment instruments found' content: application/json: schema: type: object example: status: 200 code: OK data: pos: card: pos_card lunchvoucher: pos_lunchvoucher online: card: online_card wallet: online_wallet bancontact: online_bancontact lunchvoucher: online_lunchvoucher intercard: online_intercard bankroll: online_bankroll epro: online_epro properties: status: type: integer example: 200 code: type: string example: OK data: type: object properties: pos: type: object properties: card: type: string example: pos_card lunchvoucher: type: string example: pos_lunchvoucher online: type: object properties: card: type: string example: online_card wallet: type: string example: online_wallet bancontact: type: string example: online_bancontact lunchvoucher: type: string example: online_lunchvoucher intercard: type: string example: online_intercard bankroll: type: string example: online_bankroll epro: type: string example: online_epro tags: - 'Payment API' post: summary: 'Update instruments' operationId: updateInstruments description: 'Map your instruments to Obypay instruments in order to flag every payment made correctly' parameters: [] responses: { } tags: - 'Payment API' requestBody: required: true content: application/json: schema: type: object properties: pos: type: object description: '' example: [] nullable: false properties: card: type: string description: '' example: recusandae nullable: false lunchvoucher: type: string description: '' example: vitae nullable: false online: type: object description: '' example: [] nullable: false properties: card: type: string description: '' example: delectus nullable: false wallet: type: string description: '' example: et nullable: false bancontact: type: string description: '' example: qui nullable: false lunchvoucher: type: string description: '' example: laborum nullable: false intercard: type: string description: '' example: tempora nullable: false bankroll: type: string description: '' example: et nullable: false epro: type: string description: '' example: ut nullable: false required: - pos - online tags: - name: 'Administrative API' description: '' - name: 'Auth API' description: "\nManage your access token" - name: 'Inventory API' description: '' - name: 'Notification API' description: "\n

Listeners

\nSubscribe to events by registering listeners.\n\nEach time an event occurs, every listener registered for this event is called.\n\nListeners must use the HTTPS endpoint.\n\n

Webhooks

\nTo authenticate incoming webhooks and validate that the payload has not been tampered with, you must validate the Signature header.\n\nTo compute this signature of the incoming webhook, you must compute it using the `signingKey` that was given to you :\n\n\nIf the `$computedSignature` matches the `Signature header` value, then the webhook is legit and can be used.\nOtherwise, you must discard the request.\n\nTo identify the location associated with the notification, just get `x-location-id` header value. This value represents the location in Obypay system and is immutable." - name: 'Order API' description: "\nOrder API" - name: 'Payment API' description: '' components: securitySchemes: default: type: http scheme: bearer description: "All requests must include an **Accept** header with the value **\"application/json\"**\n\n\nThe token never expires but can be revoked your Obypay backoffice.\n\n \nTo retrieve your token, please contact Obypay support" security: - default: []