Skip to main content
POST
Add a new product

Authorizations

Authorization
string
header
required

The store's API key (xfp_test_… on the sandbox, xfp_live_… on live). XFaster creates it and shows it once. An integrator key (one key for a POS company) also sends X-XFaster-Store.

Headers

Idempotency-Key
string

Any unique string. Repeating a request with the same key within 24 hours returns the first answer instead of acting twice.

Example:

"5f0c3d1e-8b6a-4e1f-9c2d-7a1b0e4f6d21"

Body

application/json
name
required
price
integer
required

Agorot, VAT included

Required range: x >= 1
barcode
string
external_id
string
category_id
integer

From GET /menu

stock
integer
Required range: x >= 0
by_weight
boolean

Response

The new product (switched off)

id
integer
Example:

3062

external_id
string | null
category_id
integer | null
name
string
price
integer
Example:

6000

discount
object | null
sale_price
integer | null
Example:

5500

available
boolean
off_until
string<date-time> | null
barcode
string | null
unit
string | null
by_weight
boolean
stock
integer | null

null where the store doesn't count stock (restaurants)

option_groups
object[]
addon_ids
integer[]