openapi: 3.0.3
info:
title: 'Obypay public API'
description: 'Obypay public API'
version: 1.0.0
servers:
-
url: 'https://public-api.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/exports/revenue:
get:
summary: 'Export daily revenue data as CSV file.'
operationId: exportDailyRevenueDataAsCSVFile
description: ''
parameters: []
responses:
200:
description: 'CSV file streamed successfully'
content:
application/json:
schema:
type: object
example:
status: 200
code: OK
data:
message: 'CSV file streamed successfully.'
properties:
status:
type: integer
example: 200
code:
type: string
example: OK
data:
type: object
properties:
message:
type: string
example: 'CSV file streamed successfully.'
403:
description: ''
content:
application/json:
schema:
oneOf:
-
description: 'Data generation not allowed for some locations'
type: object
example:
status: 403
code: 'Not Allowed'
errors:
- 'Data generation is not enabled for the following locations: LocationName'
properties:
status:
type: integer
example: 403
code:
type: string
example: 'Not Allowed'
errors:
type: array
example:
- 'Data generation is not enabled for the following locations: LocationName'
items:
type: string
-
description: 'Not authorized to access data for some locations'
type: object
example:
status: 403
code: 'Not Allowed'
errors:
- 'You are not authorized to export data for the following locations: LocationName'
properties:
status:
type: integer
example: 403
code:
type: string
example: 'Not Allowed'
errors:
type: array
example:
- 'You are not authorized to export data for the following locations: LocationName'
items:
type: string
406:
description: 'Invalid Content-Type header'
content:
application/json:
schema:
type: object
example:
status: 406
code: 'Not Acceptable'
errors:
- 'Incorrect Content-Type header. Please set Content-Type: text/csv to download the .csv file.'
properties:
status:
type: integer
example: 406
code:
type: string
example: 'Not Acceptable'
errors:
type: array
example:
- 'Incorrect Content-Type header. Please set Content-Type: text/csv to download the .csv file.'
items:
type: string
tags:
- 'Exports API'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
start_date:
type: string
description: 'Must be a valid date in the format Y-m-d. Must be a date before or equal to 2025-12-13.'
example: '2017-03-02'
nullable: false
end_date:
type: string
description: 'Must be a valid date in the format Y-m-d. Must be a date before or equal to 2025-12-13. Must be a date after or equal to start_date.'
example: '2057-10-11'
nullable: false
location_ids:
type: array
description: 'The _id of an existing record in the UserPro table.'
example:
- cupiditate
items:
type: string
required:
- start_date
- end_date
/api/v1/master/data-generation/toggle:
post:
summary: 'Toggle data generation activation for userPro locations.'
operationId: toggleDataGenerationActivationForUserProLocations
description: ''
parameters: []
responses:
200:
description: ''
content:
application/json:
schema:
oneOf:
-
description: 'Data generation updated'
type: object
example:
status: 200
code: OK
data:
message: 'Data generation activation updated successfully.'
properties:
status:
type: integer
example: 200
code:
type: string
example: OK
data:
type: object
properties:
message:
type: string
example: 'Data generation activation updated successfully.'
-
description: 'No changes applied'
type: object
example:
status: 200
code: OK
data:
message: 'No changes were applied, or the specified locations are not associated with this master account.'
properties:
status:
type: integer
example: 200
code:
type: string
example: OK
data:
type: object
properties:
message:
type: string
example: 'No changes were applied, or the specified locations are not associated with this master account.'
403:
description: Unauthorized
content:
application/json:
schema:
type: object
example:
status: 403
code: Unauthorized
errors:
- 'You are not allowed to perform this action.'
properties:
status:
type: integer
example: 403
code:
type: string
example: Unauthorized
errors:
type: array
example:
- 'You are not allowed to perform this action.'
items:
type: string
tags:
- 'Master API'
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
location_ids:
type: array
description: 'The _id of an existing record in the UserPro table.'
example:
- odit
items:
type: string
enable:
type: boolean
description: ''
example: true
nullable: false
required:
- location_ids
- enable
/api/v1/master/data-generation/locations:
get:
summary: 'Get locations with data generation enabled for a Master.'
operationId: getLocationsWithDataGenerationEnabledForAMaster
description: ''
parameters: []
responses:
200:
description: 'List of locations with data generation enabled'
content:
application/json:
schema:
type: object
example:
status: 200
code: OK
data:
message: 'Data generation activation updated successfully.'
properties:
status:
type: integer
example: 200
code:
type: string
example: OK
data:
type: object
properties:
message:
type: string
example: 'Data generation activation updated successfully.'
403:
description: Unauthorized
content:
application/json:
schema:
type: object
example:
status: 403
code: Unauthorized
errors:
- 'You are not allowed to perform this action.'
properties:
status:
type: integer
example: 403
code:
type: string
example: Unauthorized
errors:
type: array
example:
- 'You are not allowed to perform this action.'
items:
type: string
tags:
- 'Master API'
/api/v1/notifications/listeners:
post:
summary: 'Create a listener'
operationId: createAListener
description: ''
parameters: []
responses:
200:
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/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: esse
nullable: false
lunchvoucher:
type: string
description: ''
example: non
nullable: false
required:
- card
- lunchvoucher
online:
type: object
description: ''
example: []
nullable: false
properties:
card:
type: string
description: ''
example: unde
nullable: false
wallet:
type: string
description: ''
example: explicabo
nullable: false
bancontact:
type: string
description: ''
example: nesciunt
nullable: false
lunchvoucher:
type: string
description: ''
example: illo
nullable: false
intercard:
type: string
description: ''
example: accusantium
nullable: false
bankroll:
type: string
description: ''
example: aut
nullable: false
epro:
type: string
description: ''
example: veritatis
nullable: false
required:
- card
- wallet
- bancontact
- lunchvoucher
- intercard
- bankroll
- epro
required:
- pos
- online
/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:
- 'Stock 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 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:
- 'Stock 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:
- 'Stock 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:
- 'Stock 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 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:
- 'Stock 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:
- 'Stock 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 productset.'
example: HzsKRTLKXo
required: true
schema:
type: string
tags:
-
name: 'Administrative API'
description: ''
-
name: 'Auth API'
description: "\nManage your access token"
-
name: 'Exports API'
description: "\nManage data exports"
-
name: 'Master API'
description: "\nManage master-level operations"
-
name: 'Notification API'
description: "\n