Create Order
POST
/api/1.01/order
Create an order of products. Orders have to be confirmed before they are fully completed.
info
Note: Relograde API only allows order to be paid by balance.
Requested Fields
Field | Type | Required | Default | Description |
---|---|---|---|---|
reference | String | No | - | Reference text of the order |
paymentCurrency | String | Yes | - | Preferred payment currency |
items | Array | Yes | - | List of items (products) |
Item Object
Field | Type | Required | Default | Description |
---|---|---|---|---|
productSlug | String | Yes | - | Slug of the item (product) |
amount | Integer | Yes | - | Amount of the item (product) |
faceValue | Decimal | No | - | Value of product. Required for variable products |
Example Request
curl -X POST https://connect.relograde.com/api/1.01/order \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '
{
"items": [
{
"amount": 5,
"productSlug": "rewarble-ww-eur-5"
},
{
"amount": 1,
"productSlug": "rewarble-variable-eur",
"faceValue": 32
}
],
"reference": "test",
"paymentCurrency": "eur"
}'
Example Response
{
"trx": "RELO0TFQK8FXQXSPURM",
"priceCurrency": "eur",
"priceAmount": 58.14,
"priceVat": 0.23,
"priceInclVat": 58.37,
"priceFx": 1.0,
"dateCreated": "2025-01-24T11:30:20.000Z",
"type": "api",
"reference": "test",
"state": "sandbox",
"orderStatus": "created",
"isBalancePayment": true,
"downloaded": false,
"items": [
{
"product": {
"slug": "rewarble-ww-eur-5",
"name": "rewarble 5 EUR WW",
"brand": "rewarble",
"productType": "topup",
"region": "ww",
"faceValueAmount": 5.0,
"faceValueCurrency": "eur",
"mainCategory": "giftcard",
"redeemType": "currency",
"isStocked": true
},
"amount": 5,
"priceCurrency": "eur",
"singlePriceAmount": 5.1,
"totalPriceAmount": 25.5,
"totalPriceVat": 0.1,
"totalPriceInclVat": 25.6,
"priceFx": 1.0,
"paymentCurrency": "eur",
"singlePriceAmountInPaymentCurrency": 5.1,
"totalPriceAmountInPaymentCurrency": 25.5,
"totalPriceVatInPaymentCurrency": 0.1,
"totalPriceInclVatInPaymentCurrency": 25.6,
"orderLines": [
{
"tag": "TAG-189a9fe4-3a7e-40fd-a357-153e885481fd",
"status": "created"
},
{
"tag": "TAG-1ee8f999-c47f-4cfb-9309-0912f62dcc49",
"status": "created"
},
{
"tag": "TAG-faef041d-774e-4c0a-88ee-6ac3ae1261c3",
"status": "created"
},
{
"tag": "TAG-6fa744d7-4a6b-415a-9833-d06274c73145",
"status": "created"
},
{
"tag": "TAG-6823ef30-94cd-45d4-a23b-25e93ebb9145",
"status": "created"
}
],
"linesCompleted": 0,
"productSlug": "rewarble-ww-eur-5",
"faceValueAmount": 5.0,
"faceValueCurrency": "eur",
"faceValueFx": 1.0
},
{
"product": {
"slug": "rewarble-variable-eur",
"name": "Rewarble Variable EUR",
"brand": "rewarble",
"productType": "topup",
"region": "ww",
"faceValueCurrency": "eur",
"faceValueMin": 5.0,
"faceValueMax": 500.0,
"mainCategory": "giftcard",
"redeemType": "currency",
"isStocked": true
},
"amount": 1,
"priceCurrency": "eur",
"singlePriceAmount": 32.64,
"totalPriceAmount": 32.64,
"totalPriceVat": 0.13,
"totalPriceInclVat": 32.77,
"priceFx": 1.0,
"paymentCurrency": "eur",
"singlePriceAmountInPaymentCurrency": 32.64,
"totalPriceAmountInPaymentCurrency": 32.64,
"totalPriceVatInPaymentCurrency": 0.13,
"totalPriceInclVatInPaymentCurrency": 32.77,
"orderLines": [
{
"tag": "TAG-f43c2cf3-bebc-4486-8dcb-c417c874db0b",
"status": "created"
}
],
"linesCompleted": 0,
"productSlug": "rewarble-variable-eur",
"faceValueAmount": 32.0,
"faceValueCurrency": "eur",
"faceValueFx": 1.0
}
]
}
Response Fields
Field name | Field type | Field description |
---|---|---|
trx | String | Trx of order (Identifier) |
priceCurrency | String | Currency of price |
priceAmount | Decimal | Price before VAT |
priceVat | Decimal | VAT amount |
priceInclVat | Decimal | Price including VAT |
priceFx | Decimal | Price calculation multiplier |
dateCreated | Date | Creation date of order |
type | String | Type of system used to create order (portal or api) |
reference | String | Reference of order |
state | String | Environment of order (live or sandbox) |
orderStatus | String | Status of order |
isBalancePayment | Boolean | Whether the order is a balance payment or not |
downloaded | Boolean | Whether the order has been downloaded or not |
items | Object | Item object |
product | Object | Product object |
slug | String | Slug of product |
name | String | Name of product |
brand | String | Brand of product |
productType | String | Type of product |
region | String | Region in which the product can be used |
faceValueAmount | Decimal | Value of product |
faceValueCurrency | String | Currency of faceValue |
mainCategory | String | Main category of product |
redeemType | String | Redeem type of product |
isStocked | Boolean | Whether the product is in stock or not |
amount | Integer | Amount of product |
priceCurrency | String | Currency of price |
singlePriceAmount | Decimal | Price for a single product |
totalPriceAmount | Decimal | Total price of all products |
totalPriceVat | Decimal | Total VAT amount |
totalPriceInclVat | Decimal | Total price including VAT |
paymentCurrency | String | Currency of payment price |
singlePriceAmountInPaymentCurrency | Decimal | Price of a single product in payment currency |
totalPriceAmountInpaymentCurrency | Decimal | Total price of all products in payment currency |
totalPriceVatInPaymentCurrency | Decimal | Total VAT amount in payment currency |
totalPriceInclVatInPaymentCurrency | Decimal | Total price including VAT in payment currency |
orderLines | Array | Array of codes ordered |
tag | String | Internal tag (id) of the code |
status | String | Status of product |
linesCompleted | Integer | Amount of orderLines with status finished |
productSlug | String | Slug of product |
faceValueAmount | Decimal | Value of product |
faceValueCurrency | String | Currency of faceValueAmount |
faceValuefx | Decimal | Price calculation multiplier for faceValueAmount |
Errors
Errors response
Endpoint | HTTP status code | HTTP status | Message | Reason |
---|---|---|---|---|
Create order | 400 | BAD_REQUEST | company not verified | Company is not verified |
Create order | 400 | BAD_REQUEST | reference' too long, max 250 characters | Entered refence is too long |
Create order | 400 | BAD_REQUEST | no 'items' in the request | No items object inside request body |
Create order | 400 | BAD_REQUEST | no valid 'paymentCurrency' provided | No paymentCurerency in request body |
Create order | 400 | BAD_REQUEST | no account found with specified currency | Invalid paymentCurerency in request body |
Create order | 400 | UNPROCESSABLE_ENTITY | some offers not available: <offerNames> | One or more offers are not available |
Create order | 400 | UNPROCESSABLE_ENTITY | Product <productName> is out of stock | One or more productis out of stock |
Create order | 400 | BAD_REQUEST | negative item amount not supported, need at least 1 item | amount field in item object is negative or 0 |
Create order | 400 | BAD_REQUEST | can not order more than 1000 items per product | amount field(s) in item object totaling over 1000 |
Create order | 400 | BAD_REQUEST | product does not exist | Product cannot be found (likely does not exist) |
Create order | 400 | BAD_REQUEST | Missing facevalue for Variable product | No faceValue field has been entered for a variable product in request body |
Create order | 400 | BAD_REQUEST | Product <productSlug> below minimum faceValue (<faceValueMin> ) | faceValue field is below minimum of product |
Create order | 400 | BAD_REQUEST | Product <productSlug> above maximum faceValue (<faceValueMax> ) | faceValue field is below maximum of product |
Notes
note
- Currency codes follow ISO 4217 standard
- Codes shown in example have been altered and made invalid
- Price information may be provided either as fixed price or as fee
- Price information may have been altered in the documentation
- Relograde API only allows order to be paid by balance