Składanie zamówienia
Wywołanie złożenia zamówienia następuje, gdy użytkownik OpenApp potwierdza zamówienie i inicjowana jest płatność.
Widoczne jako krok 9 na diagramie sekwencji:
Żądanie
OpenApp wykona żądanie HTTP POST do endpointu skonfigurowanego w panelu merchanta, z informacją o zamówieniu w treści żądania.
Jeśli skonfigurowano adres https://shop.example.com/api/openapp/order, żądanie wykonane przez OpenApp będzie wyglądać następująco:
POST https://shop.example.com/api/openapp/order
W treści żądania POST OpenApp umieści wszystkie dane wymagane do złożenia zamówienia. Zestaw danych zależy od metody dostawy wybranej przez użytkownika.
oaOrderId jednoznacznie identyfikuje zamówienie. Jeśli zamówienie zostanie złożone, a OpenApp nie otrzyma odpowiedzi w wystarczającym czasie, może ponowić żądanie - dlatego ważne jest, aby endpoint składania zamówienia był zaimplementowany w sposób idempotentny.
Dostawa do automatu paczkowego (APM)
W poniższym przykładzie użytkownik wybrał dostawę do skrytki automatu paczkowego. Wymagane informacje to identyfikator wybranego automatu oraz dane kontaktowe użytkownika do wysłania kodu odbioru przesyłki.
- Żądanie
- Schemat
{
"oaOrderId": "OA12345678901234",
"basket": {
"id": "basket-id",
"price": {
"currency": "PLN",
"discounts": [
{
"code": "discount-code-text",
"value": 1000
}
],
"basketValue": 11000,
"deliveryCost": 100
},
"products": [
{
"ean": "12312",
"id": "id123",
"quantity": 2,
"unitPrice": 6000,
"linePrice": 12000
}
],
"loggedUser": "user-id-from-webshop"
},
"deliveryDetails": {
"type": "PICKUP",
"method": "INPOST_APM",
"subType": "APM",
"id": "WAW22A",
"name": "WAW22A",
"street": "Domaniewska",
"streetNo": "12A",
"postalCode": "02-654",
"city": "Warszawa",
"country": "PL",
"email": "id@o-app.pl",
"phoneNumber": "+48123123123"
},
"paymentDetails": {
"currency": "PLN",
"amount": 11000
},
"consents": [
{
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"version": 1
},
{
"id": "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy",
"version": 2
}
]
}
oaOrderIdstringWymaganeThe unique ID of the order generated by OpenApp.
maxLength: 36
basketobiektWymaganeThe shopping basket
Pokaż parametry podrzędneUkryj parametry podrzędne4
idstringWymaganeThe id of the shopping basket which is purchased
maxLength: 36
priceobiektWymaganeThe basket price information
Pokaż parametry podrzędneUkryj parametry podrzędne4
deliveryCostintegerWymaganeThe delivery cost. Price is expressed as the number (integer) of 1/100s of the price.
minimum: 0
currencystringWymaganebasketValueintegerWymaganeThe price of the basket. Price is expressed as the number (integer) of 1/100s of the price.
minimum: 0
discountstablica typu BasketPriceDiscountWymaganeApplied discounts
Pokaż parametry podrzędneUkryj parametry podrzędne3
codestringWymaganeThe discount code.
maxLength: 36
valueintegerWymaganeThe value of the discount. Value is expressed as the number (integer) of 1/100s of the currency.
minimum: 0
errorenumOpcjonalneThe error code of the discount
Możliwe wartości: EXPIREDINVALIDNOT_APPLICABLEUSED
productstablica typu BaseProductWymaganeThe basket products
Pokaż parametry podrzędneUkryj parametry podrzędne5
eanstringOpcjonalneThe ean (or other barcode on the product). Specifying this allows the user to search in his order history by scanning the barcode to do a re-purchase.
maxLength: 36
idstringWymaganeThe unique ID of the product.
maxLength: 36
quantityintegerWymaganeThe number of items in the purchase.
minimum: 0
unitPriceintegerWymaganeThe price of a single product. Price is expressed as the number (integer) of 1/100s of the price.
linePriceintegerWymaganeThe price of the products. Price is expressed as the number (integer) of 1/100s of the price.
loggedUserstringOpcjonalneThe id of the user in the merchant store (if known)
deliveryDetailsjeden z: PICKUP, COURIER, ELECTRONICWymaganeThe details of delivery
Pokaż parametry podrzędneUkryj parametry podrzędne3
PICKUPobiektPokaż parametry podrzędneUkryj parametry podrzędne15
typeenumWymaganeDelivery to a pickup point
Możliwe wartości: PICKUP
subTypeenumWymaganeThe type of pickup point
Możliwe wartości: APMPICKUP_POINTSHOP
methodenumWymaganeThe method
Możliwe wartości: DHL_COURIERDHL_PICKUPDPD_COURIERDPD_PICKUPELECTRONICFEDEX_COURIERGEIS_COURIERGLS_COURIERINPOST_APMINPOST_COURIERINSTORE_PICKUPORLEN_APMPOCZTA_POLSKA_APMPOCZTEX_COURIERUPS_COURIER
namestringWymaganeThe name of the pickup point
idstringWymaganeThe code of the pickup point
latnumberOpcjonalneThe lattitude of the pickup point
lngnumberOpcjonalneThe longitude of the pickup point
streetstringWymaganeThe street
streetNostringOpcjonalneThe number on the street
apartmentNostringOpcjonalneThe appartment number
postalCodestringWymaganeThe postal code
citystringWymaganeThe city
countryenumWymaganeThe country
Możliwe wartości: PL
phoneNumberstringOpcjonalneThe phone number
emailstringWymaganeThe email address
COURIERobiektPokaż parametry podrzędneUkryj parametry podrzędne14
typeenumWymaganeDelivery by courier
Możliwe wartości: COURIER
methodenumWymaganeMożliwe wartości: DHL_COURIERDHL_PICKUPDPD_COURIERDPD_PICKUPELECTRONICFEDEX_COURIERGEIS_COURIERGLS_COURIERINPOST_APMINPOST_COURIERINSTORE_PICKUPORLEN_APMPOCZTA_POLSKA_APMPOCZTEX_COURIERUPS_COURIER
streetstringWymaganeThe street
streetNostringWymaganeThe number on the street
apartmentNostringOpcjonalneThe appartment number
postalCodestringWymaganeThe postal code
citystringWymaganeThe city
countryenumWymaganeThe country
Możliwe wartości: PL
notesstringWymaganeAdditional notes
firstNamestringWymaganeThe first name
lastNamestringWymaganeThe last name
phoneNumberstringWymaganeThe phone number
companyNamestringOpcjonalneThe company name
emailstringWymaganeThe email address
ELECTRONICobiektPokaż parametry podrzędneUkryj parametry podrzędne3
typeenumWymaganeElectronic delivery
Możliwe wartości: ELECTRONIC
methodenumWymaganeMożliwe wartości: DHL_COURIERDHL_PICKUPDPD_COURIERDPD_PICKUPELECTRONICFEDEX_COURIERGEIS_COURIERGLS_COURIERINPOST_APMINPOST_COURIERINSTORE_PICKUPORLEN_APMPOCZTA_POLSKA_APMPOCZTEX_COURIERUPS_COURIER
emailstringWymaganeThe email address
billingDetailsobiektOpcjonalneThe details of invoice
Pokaż parametry podrzędneUkryj parametry podrzędne11
companyNamestringOpcjonalneThe name of the comapny for the invoice
taxIdstringOpcjonalneThe tax number
firstNamestringOpcjonalneThe first name
lastNamestringOpcjonalneThe last name
countrystringWymaganeThe country
citystringWymaganeThe city
postalCodestringWymaganeThe postal code
streetstringWymaganeThe street
streetNostringWymaganeThe number on the street
apartmentNostringOpcjonalneThe appartment number
notesstringWymaganeAdditional notes
paymentDetailsobiektWymaganeThe details of the payment
Pokaż parametry podrzędneUkryj parametry podrzędne2
amountintegerWymaganeThe total price for the order. Price is expressed as the number (integer) of 1/100s of the price.
minimum: 0
currencystringWymaganeThe currency
maxLength: 3
consentstablica typu OrderConsentWymaganeThe consents which the user agreed to
Pokaż parametry podrzędneUkryj parametry podrzędne2
idstringWymaganeThe ID of the consent as defined in the merchant panel
versionnumberWymaganeThe version of the consent
Surowy schemat JSON
{
"description": "The data for an order placed through OpenApp.",
"title": "MerchantPlaceOrder#",
"additionalProperties": false,
"type": "object",
"properties": {
"oaOrderId": {
"description": "The unique ID of the order generated by OpenApp.",
"maxLength": 36,
"type": "string",
"title": "oaOrderId"
},
"basket": {
"$ref": "#/definitions/OpenPayOrderBasket",
"description": "The shopping basket",
"title": "basket"
},
"deliveryDetails": {
"$ref": "#/definitions/DeliveryDetails",
"description": "The details of delivery",
"title": "deliveryDetails"
},
"billingDetails": {
"description": "The details of invoice",
"$ref": "#/definitions/BillingDetails",
"title": "billingDetails"
},
"paymentDetails": {
"$ref": "#/definitions/PlaceOrderAmount",
"description": "The details of the payment",
"title": "paymentDetails"
},
"consents": {
"description": "The consents which the user agreed to",
"type": "array",
"items": {
"$ref": "#/definitions/OrderConsent"
},
"title": "consents"
}
},
"required": [
"basket",
"consents",
"deliveryDetails",
"oaOrderId",
"paymentDetails"
],
"definitions": {
"OpenPayOrderBasket": {
"title": "OpenPayOrderBasket",
"type": "object",
"properties": {
"id": {
"description": "The id of the shopping basket which is purchased",
"maxLength": 36,
"type": "string",
"title": "id"
},
"price": {
"$ref": "#/definitions/PlaceOrderPrice",
"description": "The basket price information",
"title": "price"
},
"products": {
"description": "The basket products",
"type": "array",
"items": {
"$ref": "#/definitions/BaseProduct"
},
"title": "products"
},
"loggedUser": {
"description": "The id of the user in the merchant store (if known)",
"type": "string",
"title": "loggedUser"
}
},
"required": [
"id",
"price",
"products"
]
},
"PlaceOrderPrice": {
"description": "The basket price information",
"title": "PlaceOrderPrice",
"type": "object",
"properties": {
"deliveryCost": {
"description": "The delivery cost. Price is expressed as the number (integer) of 1/100s of the price.",
"minimum": 0,
"type": "integer",
"title": "deliveryCost"
},
"currency": {
"type": "string",
"title": "currency"
},
"basketValue": {
"description": "The price of the basket. Price is expressed as the number (integer) of 1/100s of the price.",
"minimum": 0,
"type": "integer",
"title": "basketValue"
},
"discounts": {
"description": "Applied discounts",
"type": "array",
"items": {
"$ref": "#/definitions/BasketPriceDiscount"
},
"title": "discounts"
}
},
"required": [
"basketValue",
"currency",
"deliveryCost",
"discounts"
]
},
"BasketPriceDiscount": {
"title": "BasketPriceDiscount",
"type": "object",
"properties": {
"code": {
"description": "The discount code.",
"maxLength": 36,
"type": "string",
"title": "code"
},
"value": {
"description": "The value of the discount. Value is expressed as the number (integer) of 1/100s of the currency.",
"minimum": 0,
"type": "integer",
"title": "value"
},
"error": {
"description": "The error code of the discount",
"enum": [
"EXPIRED",
"INVALID",
"NOT_APPLICABLE",
"USED"
],
"type": "string",
"title": "error"
}
},
"required": [
"code",
"value"
]
},
"BaseProduct": {
"title": "BaseProduct",
"type": "object",
"properties": {
"ean": {
"description": "The ean (or other barcode on the product). Specifying this allows the user to search in his order history by scanning the barcode to do a re-purchase.",
"maxLength": 36,
"type": "string",
"title": "ean"
},
"id": {
"description": "The unique ID of the product.",
"maxLength": 36,
"type": "string",
"title": "id"
},
"quantity": {
"description": "The number of items in the purchase.",
"minimum": 0,
"type": "integer",
"title": "quantity"
},
"unitPrice": {
"description": "The price of a single product. Price is expressed as the number (integer) of 1/100s of the price.",
"type": "integer",
"title": "unitPrice"
},
"linePrice": {
"description": "The price of the products. Price is expressed as the number (integer) of 1/100s of the price.",
"type": "integer",
"title": "linePrice"
}
},
"required": [
"id",
"linePrice",
"quantity",
"unitPrice"
]
},
"DeliveryDetails": {
"title": "DeliveryDetails",
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"description": "Delivery to a pickup point",
"type": "string",
"enum": [
"PICKUP"
],
"title": "type"
},
"subType": {
"$ref": "#/definitions/CheckoutDeliverySubtype",
"description": "The type of pickup point",
"title": "subType"
},
"method": {
"$ref": "#/definitions/MerchantDeliveryOptions",
"description": "The method",
"title": "method"
},
"name": {
"description": "The name of the pickup point",
"type": "string",
"title": "name"
},
"id": {
"description": "The code of the pickup point",
"type": "string",
"title": "id"
},
"lat": {
"description": "The lattitude of the pickup point",
"type": "number",
"title": "lat"
},
"lng": {
"description": "The longitude of the pickup point",
"type": "number",
"title": "lng"
},
"street": {
"description": "The street",
"type": "string",
"title": "street"
},
"streetNo": {
"description": "The number on the street",
"type": "string",
"title": "streetNo"
},
"apartmentNo": {
"description": "The appartment number",
"type": "string",
"title": "apartmentNo"
},
"postalCode": {
"description": "The postal code",
"type": "string",
"title": "postalCode"
},
"city": {
"description": "The city",
"type": "string",
"title": "city"
},
"country": {
"description": "The country",
"type": "string",
"enum": [
"PL"
],
"title": "country"
},
"phoneNumber": {
"description": "The phone number",
"type": "string",
"title": "phoneNumber"
},
"email": {
"description": "The email address",
"type": "string",
"title": "email"
}
},
"required": [
"city",
"country",
"email",
"id",
"method",
"name",
"postalCode",
"street",
"subType",
"type"
]
},
{
"type": "object",
"properties": {
"type": {
"description": "Delivery by courier",
"type": "string",
"enum": [
"COURIER"
],
"title": "type"
},
"method": {
"$ref": "#/definitions/MerchantDeliveryOptions",
"title": "method"
},
"street": {
"description": "The street",
"type": "string",
"title": "street"
},
"streetNo": {
"description": "The number on the street",
"type": "string",
"title": "streetNo"
},
"apartmentNo": {
"description": "The appartment number",
"type": "string",
"title": "apartmentNo"
},
"postalCode": {
"description": "The postal code",
"type": "string",
"title": "postalCode"
},
"city": {
"description": "The city",
"type": "string",
"title": "city"
},
"country": {
"description": "The country",
"type": "string",
"enum": [
"PL"
],
"title": "country"
},
"notes": {
"description": "Additional notes",
"type": "string",
"title": "notes"
},
"firstName": {
"description": "The first name",
"type": "string",
"title": "firstName"
},
"lastName": {
"description": "The last name",
"type": "string",
"title": "lastName"
},
"phoneNumber": {
"description": "The phone number",
"type": "string",
"title": "phoneNumber"
},
"companyName": {
"description": "The company name",
"type": "string",
"title": "companyName"
},
"email": {
"description": "The email address",
"type": "string",
"title": "email"
}
},
"required": [
"city",
"country",
"email",
"firstName",
"lastName",
"method",
"notes",
"phoneNumber",
"postalCode",
"street",
"streetNo",
"type"
]
},
{
"type": "object",
"properties": {
"type": {
"description": "Electronic delivery",
"type": "string",
"enum": [
"ELECTRONIC"
],
"title": "type"
},
"method": {
"$ref": "#/definitions/MerchantDeliveryOptions",
"title": "method"
},
"email": {
"description": "The email address",
"type": "string",
"title": "email"
}
},
"required": [
"email",
"method",
"type"
]
}
]
},
"CheckoutDeliverySubtype": {
"title": "CheckoutDeliverySubtype",
"enum": [
"APM",
"PICKUP_POINT",
"SHOP"
],
"type": "string"
},
"MerchantDeliveryOptions": {
"title": "MerchantDeliveryOptions",
"enum": [
"DHL_COURIER",
"DHL_PICKUP",
"DPD_COURIER",
"DPD_PICKUP",
"ELECTRONIC",
"FEDEX_COURIER",
"GEIS_COURIER",
"GLS_COURIER",
"INPOST_APM",
"INPOST_COURIER",
"INSTORE_PICKUP",
"ORLEN_APM",
"POCZTA_POLSKA_APM",
"POCZTEX_COURIER",
"UPS_COURIER"
],
"type": "string"
},
"BillingDetails": {
"title": "BillingDetails",
"type": "object",
"properties": {
"companyName": {
"description": "The name of the comapny for the invoice",
"type": "string",
"title": "companyName"
},
"taxId": {
"description": "The tax number",
"type": "string",
"title": "taxId"
},
"firstName": {
"description": "The first name",
"type": "string",
"title": "firstName"
},
"lastName": {
"description": "The last name",
"type": "string",
"title": "lastName"
},
"country": {
"description": "The country",
"type": "string",
"title": "country"
},
"city": {
"description": "The city",
"type": "string",
"title": "city"
},
"postalCode": {
"description": "The postal code",
"type": "string",
"title": "postalCode"
},
"street": {
"description": "The street",
"type": "string",
"title": "street"
},
"streetNo": {
"description": "The number on the street",
"type": "string",
"title": "streetNo"
},
"apartmentNo": {
"description": "The appartment number",
"type": "string",
"title": "apartmentNo"
},
"notes": {
"description": "Additional notes",
"type": "string",
"title": "notes"
}
},
"required": [
"city",
"country",
"notes",
"postalCode",
"street",
"streetNo"
]
},
"PlaceOrderAmount": {
"title": "PlaceOrderAmount",
"type": "object",
"properties": {
"amount": {
"description": "The total price for the order. Price is expressed as the number (integer) of 1/100s of the price.",
"minimum": 0,
"type": "integer",
"title": "amount"
},
"currency": {
"description": "The currency",
"maxLength": 3,
"type": "string",
"title": "currency"
}
},
"required": [
"amount",
"currency"
]
},
"OrderConsent": {
"title": "OrderConsent",
"type": "object",
"properties": {
"id": {
"description": "The ID of the consent as defined in the merchant panel",
"type": "string",
"title": "id"
},
"version": {
"description": "The version of the consent",
"type": "number",
"title": "version"
}
},
"required": [
"id",
"version"
]
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}
Użytkownik nie zażądał faktury, więc tej informacji nie ma w żądaniu. Użytkownik korzysta ponadto z funkcji anonimizacji OpenApp, aby ukryć swój adres e-mail przed sprzedawcą. Sprzedawca nadal może wysyłać wiadomości e-mail do użytkownika, ponieważ adres e-mail udostępniony przez OpenApp zostanie przekazany dalej, ale prawdziwa tożsamość użytkownika nie jest ujawniana. Jak widać na liście produktów, produkt kosztował oryginalnie 70,00 zł i został przeceniony do 60,00 zł. Zastosowano kod rabatowy o wartości 10,00 zł, więc łączna kwota zamówienia wynosi 110,00 zł.
Dostawa elektroniczna
Jeśli użytkownik wybrał dostawę elektroniczną, wymaganą daną jest adres e-mail, na który zostanie dostarczone zamówienie cyfrowe:
- Żądanie
- Schemat
{
"oaOrderId": "OA12345678901234",
"basket": {
"id": "xxx",
"price": {
"currency": "PLN",
"discounts": [],
"basketValue": 6000,
"deliveryCost": 100
},
"products": [
{
"ean": "12312",
"id": "id123",
"quantity": 1,
"unitPrice": 6000,
"linePrice": 6000
}
]
},
"deliveryDetails": {
"type": "ELECTRONIC",
"method": "ELECTRONIC",
"email": "userEmail@email.com"
},
"billingDetails": {
"companyName": "Nice Company",
"taxId": "111111111",
"country": "PL",
"city": "Warszawa",
"postalCode": "02-654",
"street": "Domaniewska",
"streetNo": "12A",
"notes": ""
},
"paymentDetails": {
"currency": "PLN",
"amount": 6000
},
"consents": [
{
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"version": 1
},
{
"id": "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy",
"version": 2
}
]
}
oaOrderIdstringWymaganeThe unique ID of the order generated by OpenApp.
maxLength: 36
basketobiektWymaganeThe shopping basket
Pokaż parametry podrzędneUkryj parametry podrzędne4
idstringWymaganeThe id of the shopping basket which is purchased
maxLength: 36
priceobiektWymaganeThe basket price information
Pokaż parametry podrzędneUkryj parametry podrzędne4
deliveryCostintegerWymaganeThe delivery cost. Price is expressed as the number (integer) of 1/100s of the price.
minimum: 0
currencystringWymaganebasketValueintegerWymaganeThe price of the basket. Price is expressed as the number (integer) of 1/100s of the price.
minimum: 0
discountstablica typu BasketPriceDiscountWymaganeApplied discounts
Pokaż parametry podrzędneUkryj parametry podrzędne3
codestringWymaganeThe discount code.
maxLength: 36
valueintegerWymaganeThe value of the discount. Value is expressed as the number (integer) of 1/100s of the currency.
minimum: 0
errorenumOpcjonalneThe error code of the discount
Możliwe wartości: EXPIREDINVALIDNOT_APPLICABLEUSED
productstablica typu BaseProductWymaganeThe basket products
Pokaż parametry podrzędneUkryj parametry podrzędne5
eanstringOpcjonalneThe ean (or other barcode on the product). Specifying this allows the user to search in his order history by scanning the barcode to do a re-purchase.
maxLength: 36
idstringWymaganeThe unique ID of the product.
maxLength: 36
quantityintegerWymaganeThe number of items in the purchase.
minimum: 0
unitPriceintegerWymaganeThe price of a single product. Price is expressed as the number (integer) of 1/100s of the price.
linePriceintegerWymaganeThe price of the products. Price is expressed as the number (integer) of 1/100s of the price.
loggedUserstringOpcjonalneThe id of the user in the merchant store (if known)
deliveryDetailsjeden z: PICKUP, COURIER, ELECTRONICWymaganeThe details of delivery
Pokaż parametry podrzędneUkryj parametry podrzędne3
PICKUPobiektPokaż parametry podrzędneUkryj parametry podrzędne15
typeenumWymaganeDelivery to a pickup point
Możliwe wartości: PICKUP
subTypeenumWymaganeThe type of pickup point
Możliwe wartości: APMPICKUP_POINTSHOP
methodenumWymaganeThe method
Możliwe wartości: DHL_COURIERDHL_PICKUPDPD_COURIERDPD_PICKUPELECTRONICFEDEX_COURIERGEIS_COURIERGLS_COURIERINPOST_APMINPOST_COURIERINSTORE_PICKUPORLEN_APMPOCZTA_POLSKA_APMPOCZTEX_COURIERUPS_COURIER
namestringWymaganeThe name of the pickup point
idstringWymaganeThe code of the pickup point
latnumberOpcjonalneThe lattitude of the pickup point
lngnumberOpcjonalneThe longitude of the pickup point
streetstringWymaganeThe street
streetNostringOpcjonalneThe number on the street
apartmentNostringOpcjonalneThe appartment number
postalCodestringWymaganeThe postal code
citystringWymaganeThe city
countryenumWymaganeThe country
Możliwe wartości: PL
phoneNumberstringOpcjonalneThe phone number
emailstringWymaganeThe email address
COURIERobiektPokaż parametry podrzędneUkryj parametry podrzędne14
typeenumWymaganeDelivery by courier
Możliwe wartości: COURIER
methodenumWymaganeMożliwe wartości: DHL_COURIERDHL_PICKUPDPD_COURIERDPD_PICKUPELECTRONICFEDEX_COURIERGEIS_COURIERGLS_COURIERINPOST_APMINPOST_COURIERINSTORE_PICKUPORLEN_APMPOCZTA_POLSKA_APMPOCZTEX_COURIERUPS_COURIER
streetstringWymaganeThe street
streetNostringWymaganeThe number on the street
apartmentNostringOpcjonalneThe appartment number
postalCodestringWymaganeThe postal code
citystringWymaganeThe city
countryenumWymaganeThe country
Możliwe wartości: PL
notesstringWymaganeAdditional notes
firstNamestringWymaganeThe first name
lastNamestringWymaganeThe last name
phoneNumberstringWymaganeThe phone number
companyNamestringOpcjonalneThe company name
emailstringWymaganeThe email address
ELECTRONICobiektPokaż parametry podrzędneUkryj parametry podrzędne3
typeenumWymaganeElectronic delivery
Możliwe wartości: ELECTRONIC
methodenumWymaganeMożliwe wartości: DHL_COURIERDHL_PICKUPDPD_COURIERDPD_PICKUPELECTRONICFEDEX_COURIERGEIS_COURIERGLS_COURIERINPOST_APMINPOST_COURIERINSTORE_PICKUPORLEN_APMPOCZTA_POLSKA_APMPOCZTEX_COURIERUPS_COURIER
emailstringWymaganeThe email address
billingDetailsobiektOpcjonalneThe details of invoice
Pokaż parametry podrzędneUkryj parametry podrzędne11
companyNamestringOpcjonalneThe name of the comapny for the invoice
taxIdstringOpcjonalneThe tax number
firstNamestringOpcjonalneThe first name
lastNamestringOpcjonalneThe last name
countrystringWymaganeThe country
citystringWymaganeThe city
postalCodestringWymaganeThe postal code
streetstringWymaganeThe street
streetNostringWymaganeThe number on the street
apartmentNostringOpcjonalneThe appartment number
notesstringWymaganeAdditional notes
paymentDetailsobiektWymaganeThe details of the payment
Pokaż parametry podrzędneUkryj parametry podrzędne2
amountintegerWymaganeThe total price for the order. Price is expressed as the number (integer) of 1/100s of the price.
minimum: 0
currencystringWymaganeThe currency
maxLength: 3
consentstablica typu OrderConsentWymaganeThe consents which the user agreed to
Pokaż parametry podrzędneUkryj parametry podrzędne2
idstringWymaganeThe ID of the consent as defined in the merchant panel
versionnumberWymaganeThe version of the consent
Surowy schemat JSON
{
"description": "The data for an order placed through OpenApp.",
"title": "MerchantPlaceOrder#",
"additionalProperties": false,
"type": "object",
"properties": {
"oaOrderId": {
"description": "The unique ID of the order generated by OpenApp.",
"maxLength": 36,
"type": "string",
"title": "oaOrderId"
},
"basket": {
"$ref": "#/definitions/OpenPayOrderBasket",
"description": "The shopping basket",
"title": "basket"
},
"deliveryDetails": {
"$ref": "#/definitions/DeliveryDetails",
"description": "The details of delivery",
"title": "deliveryDetails"
},
"billingDetails": {
"description": "The details of invoice",
"$ref": "#/definitions/BillingDetails",
"title": "billingDetails"
},
"paymentDetails": {
"$ref": "#/definitions/PlaceOrderAmount",
"description": "The details of the payment",
"title": "paymentDetails"
},
"consents": {
"description": "The consents which the user agreed to",
"type": "array",
"items": {
"$ref": "#/definitions/OrderConsent"
},
"title": "consents"
}
},
"required": [
"basket",
"consents",
"deliveryDetails",
"oaOrderId",
"paymentDetails"
],
"definitions": {
"OpenPayOrderBasket": {
"title": "OpenPayOrderBasket",
"type": "object",
"properties": {
"id": {
"description": "The id of the shopping basket which is purchased",
"maxLength": 36,
"type": "string",
"title": "id"
},
"price": {
"$ref": "#/definitions/PlaceOrderPrice",
"description": "The basket price information",
"title": "price"
},
"products": {
"description": "The basket products",
"type": "array",
"items": {
"$ref": "#/definitions/BaseProduct"
},
"title": "products"
},
"loggedUser": {
"description": "The id of the user in the merchant store (if known)",
"type": "string",
"title": "loggedUser"
}
},
"required": [
"id",
"price",
"products"
]
},
"PlaceOrderPrice": {
"description": "The basket price information",
"title": "PlaceOrderPrice",
"type": "object",
"properties": {
"deliveryCost": {
"description": "The delivery cost. Price is expressed as the number (integer) of 1/100s of the price.",
"minimum": 0,
"type": "integer",
"title": "deliveryCost"
},
"currency": {
"type": "string",
"title": "currency"
},
"basketValue": {
"description": "The price of the basket. Price is expressed as the number (integer) of 1/100s of the price.",
"minimum": 0,
"type": "integer",
"title": "basketValue"
},
"discounts": {
"description": "Applied discounts",
"type": "array",
"items": {
"$ref": "#/definitions/BasketPriceDiscount"
},
"title": "discounts"
}
},
"required": [
"basketValue",
"currency",
"deliveryCost",
"discounts"
]
},
"BasketPriceDiscount": {
"title": "BasketPriceDiscount",
"type": "object",
"properties": {
"code": {
"description": "The discount code.",
"maxLength": 36,
"type": "string",
"title": "code"
},
"value": {
"description": "The value of the discount. Value is expressed as the number (integer) of 1/100s of the currency.",
"minimum": 0,
"type": "integer",
"title": "value"
},
"error": {
"description": "The error code of the discount",
"enum": [
"EXPIRED",
"INVALID",
"NOT_APPLICABLE",
"USED"
],
"type": "string",
"title": "error"
}
},
"required": [
"code",
"value"
]
},
"BaseProduct": {
"title": "BaseProduct",
"type": "object",
"properties": {
"ean": {
"description": "The ean (or other barcode on the product). Specifying this allows the user to search in his order history by scanning the barcode to do a re-purchase.",
"maxLength": 36,
"type": "string",
"title": "ean"
},
"id": {
"description": "The unique ID of the product.",
"maxLength": 36,
"type": "string",
"title": "id"
},
"quantity": {
"description": "The number of items in the purchase.",
"minimum": 0,
"type": "integer",
"title": "quantity"
},
"unitPrice": {
"description": "The price of a single product. Price is expressed as the number (integer) of 1/100s of the price.",
"type": "integer",
"title": "unitPrice"
},
"linePrice": {
"description": "The price of the products. Price is expressed as the number (integer) of 1/100s of the price.",
"type": "integer",
"title": "linePrice"
}
},
"required": [
"id",
"linePrice",
"quantity",
"unitPrice"
]
},
"DeliveryDetails": {
"title": "DeliveryDetails",
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"description": "Delivery to a pickup point",
"type": "string",
"enum": [
"PICKUP"
],
"title": "type"
},
"subType": {
"$ref": "#/definitions/CheckoutDeliverySubtype",
"description": "The type of pickup point",
"title": "subType"
},
"method": {
"$ref": "#/definitions/MerchantDeliveryOptions",
"description": "The method",
"title": "method"
},
"name": {
"description": "The name of the pickup point",
"type": "string",
"title": "name"
},
"id": {
"description": "The code of the pickup point",
"type": "string",
"title": "id"
},
"lat": {
"description": "The lattitude of the pickup point",
"type": "number",
"title": "lat"
},
"lng": {
"description": "The longitude of the pickup point",
"type": "number",
"title": "lng"
},
"street": {
"description": "The street",
"type": "string",
"title": "street"
},
"streetNo": {
"description": "The number on the street",
"type": "string",
"title": "streetNo"
},
"apartmentNo": {
"description": "The appartment number",
"type": "string",
"title": "apartmentNo"
},
"postalCode": {
"description": "The postal code",
"type": "string",
"title": "postalCode"
},
"city": {
"description": "The city",
"type": "string",
"title": "city"
},
"country": {
"description": "The country",
"type": "string",
"enum": [
"PL"
],
"title": "country"
},
"phoneNumber": {
"description": "The phone number",
"type": "string",
"title": "phoneNumber"
},
"email": {
"description": "The email address",
"type": "string",
"title": "email"
}
},
"required": [
"city",
"country",
"email",
"id",
"method",
"name",
"postalCode",
"street",
"subType",
"type"
]
},
{
"type": "object",
"properties": {
"type": {
"description": "Delivery by courier",
"type": "string",
"enum": [
"COURIER"
],
"title": "type"
},
"method": {
"$ref": "#/definitions/MerchantDeliveryOptions",
"title": "method"
},
"street": {
"description": "The street",
"type": "string",
"title": "street"
},
"streetNo": {
"description": "The number on the street",
"type": "string",
"title": "streetNo"
},
"apartmentNo": {
"description": "The appartment number",
"type": "string",
"title": "apartmentNo"
},
"postalCode": {
"description": "The postal code",
"type": "string",
"title": "postalCode"
},
"city": {
"description": "The city",
"type": "string",
"title": "city"
},
"country": {
"description": "The country",
"type": "string",
"enum": [
"PL"
],
"title": "country"
},
"notes": {
"description": "Additional notes",
"type": "string",
"title": "notes"
},
"firstName": {
"description": "The first name",
"type": "string",
"title": "firstName"
},
"lastName": {
"description": "The last name",
"type": "string",
"title": "lastName"
},
"phoneNumber": {
"description": "The phone number",
"type": "string",
"title": "phoneNumber"
},
"companyName": {
"description": "The company name",
"type": "string",
"title": "companyName"
},
"email": {
"description": "The email address",
"type": "string",
"title": "email"
}
},
"required": [
"city",
"country",
"email",
"firstName",
"lastName",
"method",
"notes",
"phoneNumber",
"postalCode",
"street",
"streetNo",
"type"
]
},
{
"type": "object",
"properties": {
"type": {
"description": "Electronic delivery",
"type": "string",
"enum": [
"ELECTRONIC"
],
"title": "type"
},
"method": {
"$ref": "#/definitions/MerchantDeliveryOptions",
"title": "method"
},
"email": {
"description": "The email address",
"type": "string",
"title": "email"
}
},
"required": [
"email",
"method",
"type"
]
}
]
},
"CheckoutDeliverySubtype": {
"title": "CheckoutDeliverySubtype",
"enum": [
"APM",
"PICKUP_POINT",
"SHOP"
],
"type": "string"
},
"MerchantDeliveryOptions": {
"title": "MerchantDeliveryOptions",
"enum": [
"DHL_COURIER",
"DHL_PICKUP",
"DPD_COURIER",
"DPD_PICKUP",
"ELECTRONIC",
"FEDEX_COURIER",
"GEIS_COURIER",
"GLS_COURIER",
"INPOST_APM",
"INPOST_COURIER",
"INSTORE_PICKUP",
"ORLEN_APM",
"POCZTA_POLSKA_APM",
"POCZTEX_COURIER",
"UPS_COURIER"
],
"type": "string"
},
"BillingDetails": {
"title": "BillingDetails",
"type": "object",
"properties": {
"companyName": {
"description": "The name of the comapny for the invoice",
"type": "string",
"title": "companyName"
},
"taxId": {
"description": "The tax number",
"type": "string",
"title": "taxId"
},
"firstName": {
"description": "The first name",
"type": "string",
"title": "firstName"
},
"lastName": {
"description": "The last name",
"type": "string",
"title": "lastName"
},
"country": {
"description": "The country",
"type": "string",
"title": "country"
},
"city": {
"description": "The city",
"type": "string",
"title": "city"
},
"postalCode": {
"description": "The postal code",
"type": "string",
"title": "postalCode"
},
"street": {
"description": "The street",
"type": "string",
"title": "street"
},
"streetNo": {
"description": "The number on the street",
"type": "string",
"title": "streetNo"
},
"apartmentNo": {
"description": "The appartment number",
"type": "string",
"title": "apartmentNo"
},
"notes": {
"description": "Additional notes",
"type": "string",
"title": "notes"
}
},
"required": [
"city",
"country",
"notes",
"postalCode",
"street",
"streetNo"
]
},
"PlaceOrderAmount": {
"title": "PlaceOrderAmount",
"type": "object",
"properties": {
"amount": {
"description": "The total price for the order. Price is expressed as the number (integer) of 1/100s of the price.",
"minimum": 0,
"type": "integer",
"title": "amount"
},
"currency": {
"description": "The currency",
"maxLength": 3,
"type": "string",
"title": "currency"
}
},
"required": [
"amount",
"currency"
]
},
"OrderConsent": {
"title": "OrderConsent",
"type": "object",
"properties": {
"id": {
"description": "The ID of the consent as defined in the merchant panel",
"type": "string",
"title": "id"
},
"version": {
"description": "The version of the consent",
"type": "number",
"title": "version"
}
},
"required": [
"id",
"version"
]
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}
Użytkownik zakupił 1 produkt za 60,00 zł. Ponieważ nie zastosowano kodu rabatowego, lista produktów zawiera tylko unitPrice i linePrice bez previousUnitPrice i previousLinePrice. Warto zauważyć, że użytkownik wyraził zgodę na marketing e-mailowy, ale nie na marketing SMS.
Odbiór osobisty w sklepie
Jeśli użytkownik wybrał odbiór osobisty, szczegóły dostawy zawierają zestaw danych adresowych wzbogacony o pointId punktu odbioru wybranego przez użytkownika w aplikacji:
- Żądanie
- Schemat
{
"oaOrderId": "OA12345678901234",
"basket": {
"id": "basket-id",
"price": {
"currency": "PLN",
"discounts": [
{
"code": "discount-code-text",
"value": 1000
}
],
"basketValue": 11000,
"deliveryCost": 100
},
"products": [
{
"ean": "12312",
"id": "id123",
"quantity": 2,
"unitPrice": 6000,
"linePrice": 12000
}
],
"loggedUser": "user-id-from-webshop"
},
"deliveryDetails": {
"type": "PICKUP",
"method": "INPOST_APM",
"subType": "APM",
"id": "WAW22A",
"name": "WAW22A",
"street": "Domaniewska",
"streetNo": "12A",
"postalCode": "02-654",
"city": "Warszawa",
"country": "PL",
"email": "id@o-app.pl",
"phoneNumber": "+48123123123"
},
"paymentDetails": {
"currency": "PLN",
"amount": 11000
},
"consents": [
{
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"version": 1
},
{
"id": "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy",
"version": 2
}
]
}
oaOrderIdstringWymaganeThe unique ID of the order generated by OpenApp.
maxLength: 36
basketobiektWymaganeThe shopping basket
Pokaż parametry podrzędneUkryj parametry podrzędne4
idstringWymaganeThe id of the shopping basket which is purchased
maxLength: 36
priceobiektWymaganeThe basket price information
Pokaż parametry podrzędneUkryj parametry podrzędne4
deliveryCostintegerWymaganeThe delivery cost. Price is expressed as the number (integer) of 1/100s of the price.
minimum: 0
currencystringWymaganebasketValueintegerWymaganeThe price of the basket. Price is expressed as the number (integer) of 1/100s of the price.
minimum: 0
discountstablica typu BasketPriceDiscountWymaganeApplied discounts
Pokaż parametry podrzędneUkryj parametry podrzędne3
codestringWymaganeThe discount code.
maxLength: 36
valueintegerWymaganeThe value of the discount. Value is expressed as the number (integer) of 1/100s of the currency.
minimum: 0
errorenumOpcjonalneThe error code of the discount
Możliwe wartości: EXPIREDINVALIDNOT_APPLICABLEUSED
productstablica typu BaseProductWymaganeThe basket products
Pokaż parametry podrzędneUkryj parametry podrzędne5
eanstringOpcjonalneThe ean (or other barcode on the product). Specifying this allows the user to search in his order history by scanning the barcode to do a re-purchase.
maxLength: 36
idstringWymaganeThe unique ID of the product.
maxLength: 36
quantityintegerWymaganeThe number of items in the purchase.
minimum: 0
unitPriceintegerWymaganeThe price of a single product. Price is expressed as the number (integer) of 1/100s of the price.
linePriceintegerWymaganeThe price of the products. Price is expressed as the number (integer) of 1/100s of the price.
loggedUserstringOpcjonalneThe id of the user in the merchant store (if known)
deliveryDetailsjeden z: PICKUP, COURIER, ELECTRONICWymaganeThe details of delivery
Pokaż parametry podrzędneUkryj parametry podrzędne3
PICKUPobiektPokaż parametry podrzędneUkryj parametry podrzędne15
typeenumWymaganeDelivery to a pickup point
Możliwe wartości: PICKUP
subTypeenumWymaganeThe type of pickup point
Możliwe wartości: APMPICKUP_POINTSHOP
methodenumWymaganeThe method
Możliwe wartości: DHL_COURIERDHL_PICKUPDPD_COURIERDPD_PICKUPELECTRONICFEDEX_COURIERGEIS_COURIERGLS_COURIERINPOST_APMINPOST_COURIERINSTORE_PICKUPORLEN_APMPOCZTA_POLSKA_APMPOCZTEX_COURIERUPS_COURIER
namestringWymaganeThe name of the pickup point
idstringWymaganeThe code of the pickup point
latnumberOpcjonalneThe lattitude of the pickup point
lngnumberOpcjonalneThe longitude of the pickup point
streetstringWymaganeThe street
streetNostringOpcjonalneThe number on the street
apartmentNostringOpcjonalneThe appartment number
postalCodestringWymaganeThe postal code
citystringWymaganeThe city
countryenumWymaganeThe country
Możliwe wartości: PL
phoneNumberstringOpcjonalneThe phone number
emailstringWymaganeThe email address
COURIERobiektPokaż parametry podrzędneUkryj parametry podrzędne14
typeenumWymaganeDelivery by courier
Możliwe wartości: COURIER
methodenumWymaganeMożliwe wartości: DHL_COURIERDHL_PICKUPDPD_COURIERDPD_PICKUPELECTRONICFEDEX_COURIERGEIS_COURIERGLS_COURIERINPOST_APMINPOST_COURIERINSTORE_PICKUPORLEN_APMPOCZTA_POLSKA_APMPOCZTEX_COURIERUPS_COURIER
streetstringWymaganeThe street
streetNostringWymaganeThe number on the street
apartmentNostringOpcjonalneThe appartment number
postalCodestringWymaganeThe postal code
citystringWymaganeThe city
countryenumWymaganeThe country
Możliwe wartości: PL
notesstringWymaganeAdditional notes
firstNamestringWymaganeThe first name
lastNamestringWymaganeThe last name
phoneNumberstringWymaganeThe phone number
companyNamestringOpcjonalneThe company name
emailstringWymaganeThe email address
ELECTRONICobiektPokaż parametry podrzędneUkryj parametry podrzędne3
typeenumWymaganeElectronic delivery
Możliwe wartości: ELECTRONIC
methodenumWymaganeMożliwe wartości: DHL_COURIERDHL_PICKUPDPD_COURIERDPD_PICKUPELECTRONICFEDEX_COURIERGEIS_COURIERGLS_COURIERINPOST_APMINPOST_COURIERINSTORE_PICKUPORLEN_APMPOCZTA_POLSKA_APMPOCZTEX_COURIERUPS_COURIER
emailstringWymaganeThe email address
billingDetailsobiektOpcjonalneThe details of invoice
Pokaż parametry podrzędneUkryj parametry podrzędne11
companyNamestringOpcjonalneThe name of the comapny for the invoice
taxIdstringOpcjonalneThe tax number
firstNamestringOpcjonalneThe first name
lastNamestringOpcjonalneThe last name
countrystringWymaganeThe country
citystringWymaganeThe city
postalCodestringWymaganeThe postal code
streetstringWymaganeThe street
streetNostringWymaganeThe number on the street
apartmentNostringOpcjonalneThe appartment number
notesstringWymaganeAdditional notes
paymentDetailsobiektWymaganeThe details of the payment
Pokaż parametry podrzędneUkryj parametry podrzędne2
amountintegerWymaganeThe total price for the order. Price is expressed as the number (integer) of 1/100s of the price.
minimum: 0
currencystringWymaganeThe currency
maxLength: 3
consentstablica typu OrderConsentWymaganeThe consents which the user agreed to
Pokaż parametry podrzędneUkryj parametry podrzędne2
idstringWymaganeThe ID of the consent as defined in the merchant panel
versionnumberWymaganeThe version of the consent
Surowy schemat JSON
{
"description": "The data for an order placed through OpenApp.",
"title": "MerchantPlaceOrder#",
"additionalProperties": false,
"type": "object",
"properties": {
"oaOrderId": {
"description": "The unique ID of the order generated by OpenApp.",
"maxLength": 36,
"type": "string",
"title": "oaOrderId"
},
"basket": {
"$ref": "#/definitions/OpenPayOrderBasket",
"description": "The shopping basket",
"title": "basket"
},
"deliveryDetails": {
"$ref": "#/definitions/DeliveryDetails",
"description": "The details of delivery",
"title": "deliveryDetails"
},
"billingDetails": {
"description": "The details of invoice",
"$ref": "#/definitions/BillingDetails",
"title": "billingDetails"
},
"paymentDetails": {
"$ref": "#/definitions/PlaceOrderAmount",
"description": "The details of the payment",
"title": "paymentDetails"
},
"consents": {
"description": "The consents which the user agreed to",
"type": "array",
"items": {
"$ref": "#/definitions/OrderConsent"
},
"title": "consents"
}
},
"required": [
"basket",
"consents",
"deliveryDetails",
"oaOrderId",
"paymentDetails"
],
"definitions": {
"OpenPayOrderBasket": {
"title": "OpenPayOrderBasket",
"type": "object",
"properties": {
"id": {
"description": "The id of the shopping basket which is purchased",
"maxLength": 36,
"type": "string",
"title": "id"
},
"price": {
"$ref": "#/definitions/PlaceOrderPrice",
"description": "The basket price information",
"title": "price"
},
"products": {
"description": "The basket products",
"type": "array",
"items": {
"$ref": "#/definitions/BaseProduct"
},
"title": "products"
},
"loggedUser": {
"description": "The id of the user in the merchant store (if known)",
"type": "string",
"title": "loggedUser"
}
},
"required": [
"id",
"price",
"products"
]
},
"PlaceOrderPrice": {
"description": "The basket price information",
"title": "PlaceOrderPrice",
"type": "object",
"properties": {
"deliveryCost": {
"description": "The delivery cost. Price is expressed as the number (integer) of 1/100s of the price.",
"minimum": 0,
"type": "integer",
"title": "deliveryCost"
},
"currency": {
"type": "string",
"title": "currency"
},
"basketValue": {
"description": "The price of the basket. Price is expressed as the number (integer) of 1/100s of the price.",
"minimum": 0,
"type": "integer",
"title": "basketValue"
},
"discounts": {
"description": "Applied discounts",
"type": "array",
"items": {
"$ref": "#/definitions/BasketPriceDiscount"
},
"title": "discounts"
}
},
"required": [
"basketValue",
"currency",
"deliveryCost",
"discounts"
]
},
"BasketPriceDiscount": {
"title": "BasketPriceDiscount",
"type": "object",
"properties": {
"code": {
"description": "The discount code.",
"maxLength": 36,
"type": "string",
"title": "code"
},
"value": {
"description": "The value of the discount. Value is expressed as the number (integer) of 1/100s of the currency.",
"minimum": 0,
"type": "integer",
"title": "value"
},
"error": {
"description": "The error code of the discount",
"enum": [
"EXPIRED",
"INVALID",
"NOT_APPLICABLE",
"USED"
],
"type": "string",
"title": "error"
}
},
"required": [
"code",
"value"
]
},
"BaseProduct": {
"title": "BaseProduct",
"type": "object",
"properties": {
"ean": {
"description": "The ean (or other barcode on the product). Specifying this allows the user to search in his order history by scanning the barcode to do a re-purchase.",
"maxLength": 36,
"type": "string",
"title": "ean"
},
"id": {
"description": "The unique ID of the product.",
"maxLength": 36,
"type": "string",
"title": "id"
},
"quantity": {
"description": "The number of items in the purchase.",
"minimum": 0,
"type": "integer",
"title": "quantity"
},
"unitPrice": {
"description": "The price of a single product. Price is expressed as the number (integer) of 1/100s of the price.",
"type": "integer",
"title": "unitPrice"
},
"linePrice": {
"description": "The price of the products. Price is expressed as the number (integer) of 1/100s of the price.",
"type": "integer",
"title": "linePrice"
}
},
"required": [
"id",
"linePrice",
"quantity",
"unitPrice"
]
},
"DeliveryDetails": {
"title": "DeliveryDetails",
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"description": "Delivery to a pickup point",
"type": "string",
"enum": [
"PICKUP"
],
"title": "type"
},
"subType": {
"$ref": "#/definitions/CheckoutDeliverySubtype",
"description": "The type of pickup point",
"title": "subType"
},
"method": {
"$ref": "#/definitions/MerchantDeliveryOptions",
"description": "The method",
"title": "method"
},
"name": {
"description": "The name of the pickup point",
"type": "string",
"title": "name"
},
"id": {
"description": "The code of the pickup point",
"type": "string",
"title": "id"
},
"lat": {
"description": "The lattitude of the pickup point",
"type": "number",
"title": "lat"
},
"lng": {
"description": "The longitude of the pickup point",
"type": "number",
"title": "lng"
},
"street": {
"description": "The street",
"type": "string",
"title": "street"
},
"streetNo": {
"description": "The number on the street",
"type": "string",
"title": "streetNo"
},
"apartmentNo": {
"description": "The appartment number",
"type": "string",
"title": "apartmentNo"
},
"postalCode": {
"description": "The postal code",
"type": "string",
"title": "postalCode"
},
"city": {
"description": "The city",
"type": "string",
"title": "city"
},
"country": {
"description": "The country",
"type": "string",
"enum": [
"PL"
],
"title": "country"
},
"phoneNumber": {
"description": "The phone number",
"type": "string",
"title": "phoneNumber"
},
"email": {
"description": "The email address",
"type": "string",
"title": "email"
}
},
"required": [
"city",
"country",
"email",
"id",
"method",
"name",
"postalCode",
"street",
"subType",
"type"
]
},
{
"type": "object",
"properties": {
"type": {
"description": "Delivery by courier",
"type": "string",
"enum": [
"COURIER"
],
"title": "type"
},
"method": {
"$ref": "#/definitions/MerchantDeliveryOptions",
"title": "method"
},
"street": {
"description": "The street",
"type": "string",
"title": "street"
},
"streetNo": {
"description": "The number on the street",
"type": "string",
"title": "streetNo"
},
"apartmentNo": {
"description": "The appartment number",
"type": "string",
"title": "apartmentNo"
},
"postalCode": {
"description": "The postal code",
"type": "string",
"title": "postalCode"
},
"city": {
"description": "The city",
"type": "string",
"title": "city"
},
"country": {
"description": "The country",
"type": "string",
"enum": [
"PL"
],
"title": "country"
},
"notes": {
"description": "Additional notes",
"type": "string",
"title": "notes"
},
"firstName": {
"description": "The first name",
"type": "string",
"title": "firstName"
},
"lastName": {
"description": "The last name",
"type": "string",
"title": "lastName"
},
"phoneNumber": {
"description": "The phone number",
"type": "string",
"title": "phoneNumber"
},
"companyName": {
"description": "The company name",
"type": "string",
"title": "companyName"
},
"email": {
"description": "The email address",
"type": "string",
"title": "email"
}
},
"required": [
"city",
"country",
"email",
"firstName",
"lastName",
"method",
"notes",
"phoneNumber",
"postalCode",
"street",
"streetNo",
"type"
]
},
{
"type": "object",
"properties": {
"type": {
"description": "Electronic delivery",
"type": "string",
"enum": [
"ELECTRONIC"
],
"title": "type"
},
"method": {
"$ref": "#/definitions/MerchantDeliveryOptions",
"title": "method"
},
"email": {
"description": "The email address",
"type": "string",
"title": "email"
}
},
"required": [
"email",
"method",
"type"
]
}
]
},
"CheckoutDeliverySubtype": {
"title": "CheckoutDeliverySubtype",
"enum": [
"APM",
"PICKUP_POINT",
"SHOP"
],
"type": "string"
},
"MerchantDeliveryOptions": {
"title": "MerchantDeliveryOptions",
"enum": [
"DHL_COURIER",
"DHL_PICKUP",
"DPD_COURIER",
"DPD_PICKUP",
"ELECTRONIC",
"FEDEX_COURIER",
"GEIS_COURIER",
"GLS_COURIER",
"INPOST_APM",
"INPOST_COURIER",
"INSTORE_PICKUP",
"ORLEN_APM",
"POCZTA_POLSKA_APM",
"POCZTEX_COURIER",
"UPS_COURIER"
],
"type": "string"
},
"BillingDetails": {
"title": "BillingDetails",
"type": "object",
"properties": {
"companyName": {
"description": "The name of the comapny for the invoice",
"type": "string",
"title": "companyName"
},
"taxId": {
"description": "The tax number",
"type": "string",
"title": "taxId"
},
"firstName": {
"description": "The first name",
"type": "string",
"title": "firstName"
},
"lastName": {
"description": "The last name",
"type": "string",
"title": "lastName"
},
"country": {
"description": "The country",
"type": "string",
"title": "country"
},
"city": {
"description": "The city",
"type": "string",
"title": "city"
},
"postalCode": {
"description": "The postal code",
"type": "string",
"title": "postalCode"
},
"street": {
"description": "The street",
"type": "string",
"title": "street"
},
"streetNo": {
"description": "The number on the street",
"type": "string",
"title": "streetNo"
},
"apartmentNo": {
"description": "The appartment number",
"type": "string",
"title": "apartmentNo"
},
"notes": {
"description": "Additional notes",
"type": "string",
"title": "notes"
}
},
"required": [
"city",
"country",
"notes",
"postalCode",
"street",
"streetNo"
]
},
"PlaceOrderAmount": {
"title": "PlaceOrderAmount",
"type": "object",
"properties": {
"amount": {
"description": "The total price for the order. Price is expressed as the number (integer) of 1/100s of the price.",
"minimum": 0,
"type": "integer",
"title": "amount"
},
"currency": {
"description": "The currency",
"maxLength": 3,
"type": "string",
"title": "currency"
}
},
"required": [
"amount",
"currency"
]
},
"OrderConsent": {
"title": "OrderConsent",
"type": "object",
"properties": {
"id": {
"description": "The ID of the consent as defined in the merchant panel",
"type": "string",
"title": "id"
},
"version": {
"description": "The version of the consent",
"type": "number",
"title": "version"
}
},
"required": [
"id",
"version"
]
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}
Dostawa kurierem
Jeśli użytkownik wybrał dostawę kurierem, szczegóły dostawy zawierają pełny zestaw danych adresowych:
- Żądanie
- Schemat
{
"oaOrderId": "OA12345678901234",
"basket": {
"id": "basket-id",
"price": {
"currency": "PLN",
"discounts": [],
"basketValue": 12995,
"deliveryCost": 100
},
"products": [
{
"ean": "12312",
"id": "id123",
"quantity": 2,
"unitPrice": 6000,
"linePrice": 12000
}
],
"loggedUser": "user-id-from-webshop"
},
"deliveryDetails": {
"type": "COURIER",
"method": "INPOST_COURIER",
"firstName": "John",
"lastName": "Doe",
"country": "PL",
"city": "Warszawa",
"postalCode": "02-654",
"street": "Domaniewska",
"streetNo": "12",
"apartmentNo": "17",
"notes": "Please place the package on the porch behind the rose-bush if nobody opens the door.",
"phoneNumber": "+48123456789",
"email": "test@example.com",
"companyName": "Nice Company"
},
"billingDetails": {
"companyName": "Nice Company",
"taxId": "111111111",
"country": "PL",
"city": "Warszawa",
"postalCode": "02-654",
"street": "Domaniewska",
"streetNo": "12A",
"notes": ""
},
"paymentDetails": {
"currency": "PLN",
"amount": 12995
},
"consents": [
{
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"version": 1
},
{
"id": "yyyyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyyyy",
"version": 2
}
]
}
oaOrderIdstringWymaganeThe unique ID of the order generated by OpenApp.
maxLength: 36
basketobiektWymaganeThe shopping basket
Pokaż parametry podrzędneUkryj parametry podrzędne4
idstringWymaganeThe id of the shopping basket which is purchased
maxLength: 36
priceobiektWymaganeThe basket price information
Pokaż parametry podrzędneUkryj parametry podrzędne4
deliveryCostintegerWymaganeThe delivery cost. Price is expressed as the number (integer) of 1/100s of the price.
minimum: 0
currencystringWymaganebasketValueintegerWymaganeThe price of the basket. Price is expressed as the number (integer) of 1/100s of the price.
minimum: 0
discountstablica typu BasketPriceDiscountWymaganeApplied discounts
Pokaż parametry podrzędneUkryj parametry podrzędne3
codestringWymaganeThe discount code.
maxLength: 36
valueintegerWymaganeThe value of the discount. Value is expressed as the number (integer) of 1/100s of the currency.
minimum: 0
errorenumOpcjonalneThe error code of the discount
Możliwe wartości: EXPIREDINVALIDNOT_APPLICABLEUSED
productstablica typu BaseProductWymaganeThe basket products
Pokaż parametry podrzędneUkryj parametry podrzędne5
eanstringOpcjonalneThe ean (or other barcode on the product). Specifying this allows the user to search in his order history by scanning the barcode to do a re-purchase.
maxLength: 36
idstringWymaganeThe unique ID of the product.
maxLength: 36
quantityintegerWymaganeThe number of items in the purchase.
minimum: 0
unitPriceintegerWymaganeThe price of a single product. Price is expressed as the number (integer) of 1/100s of the price.
linePriceintegerWymaganeThe price of the products. Price is expressed as the number (integer) of 1/100s of the price.
loggedUserstringOpcjonalneThe id of the user in the merchant store (if known)
deliveryDetailsjeden z: PICKUP, COURIER, ELECTRONICWymaganeThe details of delivery
Pokaż parametry podrzędneUkryj parametry podrzędne3
PICKUPobiektPokaż parametry podrzędneUkryj parametry podrzędne15
typeenumWymaganeDelivery to a pickup point
Możliwe wartości: PICKUP
subTypeenumWymaganeThe type of pickup point
Możliwe wartości: APMPICKUP_POINTSHOP
methodenumWymaganeThe method
Możliwe wartości: DHL_COURIERDHL_PICKUPDPD_COURIERDPD_PICKUPELECTRONICFEDEX_COURIERGEIS_COURIERGLS_COURIERINPOST_APMINPOST_COURIERINSTORE_PICKUPORLEN_APMPOCZTA_POLSKA_APMPOCZTEX_COURIERUPS_COURIER
namestringWymaganeThe name of the pickup point
idstringWymaganeThe code of the pickup point
latnumberOpcjonalneThe lattitude of the pickup point
lngnumberOpcjonalneThe longitude of the pickup point
streetstringWymaganeThe street
streetNostringOpcjonalneThe number on the street
apartmentNostringOpcjonalneThe appartment number
postalCodestringWymaganeThe postal code
citystringWymaganeThe city
countryenumWymaganeThe country
Możliwe wartości: PL
phoneNumberstringOpcjonalneThe phone number
emailstringWymaganeThe email address
COURIERobiektPokaż parametry podrzędneUkryj parametry podrzędne14
typeenumWymaganeDelivery by courier
Możliwe wartości: COURIER
methodenumWymaganeMożliwe wartości: DHL_COURIERDHL_PICKUPDPD_COURIERDPD_PICKUPELECTRONICFEDEX_COURIERGEIS_COURIERGLS_COURIERINPOST_APMINPOST_COURIERINSTORE_PICKUPORLEN_APMPOCZTA_POLSKA_APMPOCZTEX_COURIERUPS_COURIER
streetstringWymaganeThe street
streetNostringWymaganeThe number on the street
apartmentNostringOpcjonalneThe appartment number
postalCodestringWymaganeThe postal code
citystringWymaganeThe city
countryenumWymaganeThe country
Możliwe wartości: PL
notesstringWymaganeAdditional notes
firstNamestringWymaganeThe first name
lastNamestringWymaganeThe last name
phoneNumberstringWymaganeThe phone number
companyNamestringOpcjonalneThe company name
emailstringWymaganeThe email address
ELECTRONICobiektPokaż parametry podrzędneUkryj parametry podrzędne3
typeenumWymaganeElectronic delivery
Możliwe wartości: ELECTRONIC
methodenumWymaganeMożliwe wartości: DHL_COURIERDHL_PICKUPDPD_COURIERDPD_PICKUPELECTRONICFEDEX_COURIERGEIS_COURIERGLS_COURIERINPOST_APMINPOST_COURIERINSTORE_PICKUPORLEN_APMPOCZTA_POLSKA_APMPOCZTEX_COURIERUPS_COURIER
emailstringWymaganeThe email address
billingDetailsobiektOpcjonalneThe details of invoice
Pokaż parametry podrzędneUkryj parametry podrzędne11
companyNamestringOpcjonalneThe name of the comapny for the invoice
taxIdstringOpcjonalneThe tax number
firstNamestringOpcjonalneThe first name
lastNamestringOpcjonalneThe last name
countrystringWymaganeThe country
citystringWymaganeThe city
postalCodestringWymaganeThe postal code
streetstringWymaganeThe street
streetNostringWymaganeThe number on the street
apartmentNostringOpcjonalneThe appartment number
notesstringWymaganeAdditional notes
paymentDetailsobiektWymaganeThe details of the payment
Pokaż parametry podrzędneUkryj parametry podrzędne2
amountintegerWymaganeThe total price for the order. Price is expressed as the number (integer) of 1/100s of the price.
minimum: 0
currencystringWymaganeThe currency
maxLength: 3
consentstablica typu OrderConsentWymaganeThe consents which the user agreed to
Pokaż parametry podrzędneUkryj parametry podrzędne2
idstringWymaganeThe ID of the consent as defined in the merchant panel
versionnumberWymaganeThe version of the consent
Surowy schemat JSON
{
"description": "The data for an order placed through OpenApp.",
"title": "MerchantPlaceOrder#",
"additionalProperties": false,
"type": "object",
"properties": {
"oaOrderId": {
"description": "The unique ID of the order generated by OpenApp.",
"maxLength": 36,
"type": "string",
"title": "oaOrderId"
},
"basket": {
"$ref": "#/definitions/OpenPayOrderBasket",
"description": "The shopping basket",
"title": "basket"
},
"deliveryDetails": {
"$ref": "#/definitions/DeliveryDetails",
"description": "The details of delivery",
"title": "deliveryDetails"
},
"billingDetails": {
"description": "The details of invoice",
"$ref": "#/definitions/BillingDetails",
"title": "billingDetails"
},
"paymentDetails": {
"$ref": "#/definitions/PlaceOrderAmount",
"description": "The details of the payment",
"title": "paymentDetails"
},
"consents": {
"description": "The consents which the user agreed to",
"type": "array",
"items": {
"$ref": "#/definitions/OrderConsent"
},
"title": "consents"
}
},
"required": [
"basket",
"consents",
"deliveryDetails",
"oaOrderId",
"paymentDetails"
],
"definitions": {
"OpenPayOrderBasket": {
"title": "OpenPayOrderBasket",
"type": "object",
"properties": {
"id": {
"description": "The id of the shopping basket which is purchased",
"maxLength": 36,
"type": "string",
"title": "id"
},
"price": {
"$ref": "#/definitions/PlaceOrderPrice",
"description": "The basket price information",
"title": "price"
},
"products": {
"description": "The basket products",
"type": "array",
"items": {
"$ref": "#/definitions/BaseProduct"
},
"title": "products"
},
"loggedUser": {
"description": "The id of the user in the merchant store (if known)",
"type": "string",
"title": "loggedUser"
}
},
"required": [
"id",
"price",
"products"
]
},
"PlaceOrderPrice": {
"description": "The basket price information",
"title": "PlaceOrderPrice",
"type": "object",
"properties": {
"deliveryCost": {
"description": "The delivery cost. Price is expressed as the number (integer) of 1/100s of the price.",
"minimum": 0,
"type": "integer",
"title": "deliveryCost"
},
"currency": {
"type": "string",
"title": "currency"
},
"basketValue": {
"description": "The price of the basket. Price is expressed as the number (integer) of 1/100s of the price.",
"minimum": 0,
"type": "integer",
"title": "basketValue"
},
"discounts": {
"description": "Applied discounts",
"type": "array",
"items": {
"$ref": "#/definitions/BasketPriceDiscount"
},
"title": "discounts"
}
},
"required": [
"basketValue",
"currency",
"deliveryCost",
"discounts"
]
},
"BasketPriceDiscount": {
"title": "BasketPriceDiscount",
"type": "object",
"properties": {
"code": {
"description": "The discount code.",
"maxLength": 36,
"type": "string",
"title": "code"
},
"value": {
"description": "The value of the discount. Value is expressed as the number (integer) of 1/100s of the currency.",
"minimum": 0,
"type": "integer",
"title": "value"
},
"error": {
"description": "The error code of the discount",
"enum": [
"EXPIRED",
"INVALID",
"NOT_APPLICABLE",
"USED"
],
"type": "string",
"title": "error"
}
},
"required": [
"code",
"value"
]
},
"BaseProduct": {
"title": "BaseProduct",
"type": "object",
"properties": {
"ean": {
"description": "The ean (or other barcode on the product). Specifying this allows the user to search in his order history by scanning the barcode to do a re-purchase.",
"maxLength": 36,
"type": "string",
"title": "ean"
},
"id": {
"description": "The unique ID of the product.",
"maxLength": 36,
"type": "string",
"title": "id"
},
"quantity": {
"description": "The number of items in the purchase.",
"minimum": 0,
"type": "integer",
"title": "quantity"
},
"unitPrice": {
"description": "The price of a single product. Price is expressed as the number (integer) of 1/100s of the price.",
"type": "integer",
"title": "unitPrice"
},
"linePrice": {
"description": "The price of the products. Price is expressed as the number (integer) of 1/100s of the price.",
"type": "integer",
"title": "linePrice"
}
},
"required": [
"id",
"linePrice",
"quantity",
"unitPrice"
]
},
"DeliveryDetails": {
"title": "DeliveryDetails",
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"description": "Delivery to a pickup point",
"type": "string",
"enum": [
"PICKUP"
],
"title": "type"
},
"subType": {
"$ref": "#/definitions/CheckoutDeliverySubtype",
"description": "The type of pickup point",
"title": "subType"
},
"method": {
"$ref": "#/definitions/MerchantDeliveryOptions",
"description": "The method",
"title": "method"
},
"name": {
"description": "The name of the pickup point",
"type": "string",
"title": "name"
},
"id": {
"description": "The code of the pickup point",
"type": "string",
"title": "id"
},
"lat": {
"description": "The lattitude of the pickup point",
"type": "number",
"title": "lat"
},
"lng": {
"description": "The longitude of the pickup point",
"type": "number",
"title": "lng"
},
"street": {
"description": "The street",
"type": "string",
"title": "street"
},
"streetNo": {
"description": "The number on the street",
"type": "string",
"title": "streetNo"
},
"apartmentNo": {
"description": "The appartment number",
"type": "string",
"title": "apartmentNo"
},
"postalCode": {
"description": "The postal code",
"type": "string",
"title": "postalCode"
},
"city": {
"description": "The city",
"type": "string",
"title": "city"
},
"country": {
"description": "The country",
"type": "string",
"enum": [
"PL"
],
"title": "country"
},
"phoneNumber": {
"description": "The phone number",
"type": "string",
"title": "phoneNumber"
},
"email": {
"description": "The email address",
"type": "string",
"title": "email"
}
},
"required": [
"city",
"country",
"email",
"id",
"method",
"name",
"postalCode",
"street",
"subType",
"type"
]
},
{
"type": "object",
"properties": {
"type": {
"description": "Delivery by courier",
"type": "string",
"enum": [
"COURIER"
],
"title": "type"
},
"method": {
"$ref": "#/definitions/MerchantDeliveryOptions",
"title": "method"
},
"street": {
"description": "The street",
"type": "string",
"title": "street"
},
"streetNo": {
"description": "The number on the street",
"type": "string",
"title": "streetNo"
},
"apartmentNo": {
"description": "The appartment number",
"type": "string",
"title": "apartmentNo"
},
"postalCode": {
"description": "The postal code",
"type": "string",
"title": "postalCode"
},
"city": {
"description": "The city",
"type": "string",
"title": "city"
},
"country": {
"description": "The country",
"type": "string",
"enum": [
"PL"
],
"title": "country"
},
"notes": {
"description": "Additional notes",
"type": "string",
"title": "notes"
},
"firstName": {
"description": "The first name",
"type": "string",
"title": "firstName"
},
"lastName": {
"description": "The last name",
"type": "string",
"title": "lastName"
},
"phoneNumber": {
"description": "The phone number",
"type": "string",
"title": "phoneNumber"
},
"companyName": {
"description": "The company name",
"type": "string",
"title": "companyName"
},
"email": {
"description": "The email address",
"type": "string",
"title": "email"
}
},
"required": [
"city",
"country",
"email",
"firstName",
"lastName",
"method",
"notes",
"phoneNumber",
"postalCode",
"street",
"streetNo",
"type"
]
},
{
"type": "object",
"properties": {
"type": {
"description": "Electronic delivery",
"type": "string",
"enum": [
"ELECTRONIC"
],
"title": "type"
},
"method": {
"$ref": "#/definitions/MerchantDeliveryOptions",
"title": "method"
},
"email": {
"description": "The email address",
"type": "string",
"title": "email"
}
},
"required": [
"email",
"method",
"type"
]
}
]
},
"CheckoutDeliverySubtype": {
"title": "CheckoutDeliverySubtype",
"enum": [
"APM",
"PICKUP_POINT",
"SHOP"
],
"type": "string"
},
"MerchantDeliveryOptions": {
"title": "MerchantDeliveryOptions",
"enum": [
"DHL_COURIER",
"DHL_PICKUP",
"DPD_COURIER",
"DPD_PICKUP",
"ELECTRONIC",
"FEDEX_COURIER",
"GEIS_COURIER",
"GLS_COURIER",
"INPOST_APM",
"INPOST_COURIER",
"INSTORE_PICKUP",
"ORLEN_APM",
"POCZTA_POLSKA_APM",
"POCZTEX_COURIER",
"UPS_COURIER"
],
"type": "string"
},
"BillingDetails": {
"title": "BillingDetails",
"type": "object",
"properties": {
"companyName": {
"description": "The name of the comapny for the invoice",
"type": "string",
"title": "companyName"
},
"taxId": {
"description": "The tax number",
"type": "string",
"title": "taxId"
},
"firstName": {
"description": "The first name",
"type": "string",
"title": "firstName"
},
"lastName": {
"description": "The last name",
"type": "string",
"title": "lastName"
},
"country": {
"description": "The country",
"type": "string",
"title": "country"
},
"city": {
"description": "The city",
"type": "string",
"title": "city"
},
"postalCode": {
"description": "The postal code",
"type": "string",
"title": "postalCode"
},
"street": {
"description": "The street",
"type": "string",
"title": "street"
},
"streetNo": {
"description": "The number on the street",
"type": "string",
"title": "streetNo"
},
"apartmentNo": {
"description": "The appartment number",
"type": "string",
"title": "apartmentNo"
},
"notes": {
"description": "Additional notes",
"type": "string",
"title": "notes"
}
},
"required": [
"city",
"country",
"notes",
"postalCode",
"street",
"streetNo"
]
},
"PlaceOrderAmount": {
"title": "PlaceOrderAmount",
"type": "object",
"properties": {
"amount": {
"description": "The total price for the order. Price is expressed as the number (integer) of 1/100s of the price.",
"minimum": 0,
"type": "integer",
"title": "amount"
},
"currency": {
"description": "The currency",
"maxLength": 3,
"type": "string",
"title": "currency"
}
},
"required": [
"amount",
"currency"
]
},
"OrderConsent": {
"title": "OrderConsent",
"type": "object",
"properties": {
"id": {
"description": "The ID of the consent as defined in the merchant panel",
"type": "string",
"title": "id"
},
"version": {
"description": "The version of the consent",
"type": "number",
"title": "version"
}
},
"required": [
"id",
"version"
]
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}
Ponieważ dostawa kurierem nie jest bezpłatna, do łącznej kwoty zamówienia doliczana jest dodatkowa opłata 9,95 zł.
Odpowiedź
W odpowiedzi sklep musi przesłać potwierdzenie złożenia zamówienia.
- Odpowiedź
- Schemat
{
"oaOrderId": "0123456789abcdef0123456789abcdef",
"shopOrderId": "WS1213ASDZXC231A",
"returnPolicy": {
"maxReturnDays": 30
}
}
shopOrderIdstringWymaganeThe unique ID of the order.
maxLength: 36
oaOrderIdstringOpcjonalneThe ID of the order as generated by OpenApp. Mandatory in case of an asynchronous connection through a queue in order to correlate the placed order with the response.
maxLength: 36
returnPolicyobiektWymaganeThe policy for returning the order
Pokaż parametry podrzędneUkryj parametry podrzędne1
maxReturnDaysintegerWymaganeThe length of the allowed return period for the order.
minimum: 0
shipmentstablica typu OrderShipmentMultiOpcjonalneThe shipments for the order
Pokaż parametry podrzędneUkryj parametry podrzędne8
shipmentIdstringWymaganeThe id of the shipment
maxLength: 64
statusenumWymaganeThe status of the shipment
Możliwe wartości: CANCELLED_MERCHANTDELIVEREDFULFILLEDIN_DELIVERYORDEREDREADY_FOR_PICKUPSHIPPED
notesstringOpcjonalneOptional merchant notes on the shipment
maxLength: 64
productstablica typu OrderShipmentProductOpcjonalneThe products which will be in this shipment
Pokaż parametry podrzędneUkryj parametry podrzędne2
idstringWymaganeThe unique ID of the product.
maxLength: 36
quantityintegerWymaganeThe number of items in the purchase.
minimum: 0
timingstringOpcjonalneThe estimation of the delivery time, i.e. 'next business day' or 'July 18th'.
maxLength: 40
operatorstringOpcjonalneThe operator of the shipment
maxLength: 64
trackingCodestringOpcjonalneThe tracking code.
maxLength: 64
trackingUrlstringOpcjonalneThe tracking URL.
maxLength: 255
Surowy schemat JSON
{
"additionalProperties": false,
"type": "object",
"properties": {
"shopOrderId": {
"description": "The unique ID of the order.",
"maxLength": 36,
"type": "string",
"title": "shopOrderId"
},
"oaOrderId": {
"description": "The ID of the order as generated by OpenApp. Mandatory in case of an asynchronous connection through a queue in order to correlate the placed order with the response.",
"maxLength": 36,
"type": "string",
"title": "oaOrderId"
},
"returnPolicy": {
"$ref": "#/definitions/OrderReturnPolicy",
"description": "The policy for returning the order",
"title": "returnPolicy"
},
"shipments": {
"description": "The shipments for the order",
"type": "array",
"items": {
"$ref": "#/definitions/OrderShipmentMulti"
},
"title": "shipments"
}
},
"required": [
"returnPolicy",
"shopOrderId"
],
"definitions": {
"OrderReturnPolicy": {
"title": "OrderReturnPolicy",
"type": "object",
"properties": {
"maxReturnDays": {
"description": "The length of the allowed return period for the order.",
"minimum": 0,
"type": "integer",
"title": "maxReturnDays"
}
},
"required": [
"maxReturnDays"
]
},
"OrderShipmentMulti": {
"additionalProperties": false,
"title": "OrderShipmentMulti",
"type": "object",
"properties": {
"shipmentId": {
"description": "The id of the shipment",
"maxLength": 64,
"type": "string",
"title": "shipmentId"
},
"status": {
"$ref": "#/definitions/StoreDeliveryStatus",
"description": "The status of the shipment",
"title": "status"
},
"notes": {
"description": "Optional merchant notes on the shipment",
"maxLength": 64,
"type": "string",
"title": "notes"
},
"products": {
"description": "The products which will be in this shipment",
"type": "array",
"items": {
"$ref": "#/definitions/OrderShipmentProduct"
},
"title": "products"
},
"timing": {
"description": "The estimation of the delivery time, i.e. 'next business day' or 'July 18th'.",
"maxLength": 40,
"type": "string",
"title": "timing"
},
"operator": {
"description": "The operator of the shipment",
"maxLength": 64,
"type": "string",
"title": "operator"
},
"trackingCode": {
"description": "The tracking code.",
"maxLength": 64,
"type": "string",
"title": "trackingCode"
},
"trackingUrl": {
"description": "The tracking URL.",
"maxLength": 255,
"type": "string",
"title": "trackingUrl"
}
},
"required": [
"shipmentId",
"status"
]
},
"StoreDeliveryStatus": {
"title": "StoreDeliveryStatus",
"enum": [
"CANCELLED_MERCHANT",
"DELIVERED",
"FULFILLED",
"IN_DELIVERY",
"ORDERED",
"READY_FOR_PICKUP",
"SHIPPED"
],
"type": "string"
},
"OrderShipmentProduct": {
"additionalProperties": false,
"title": "OrderShipmentProduct",
"type": "object",
"properties": {
"id": {
"description": "The unique ID of the product.",
"maxLength": 36,
"type": "string",
"title": "id"
},
"quantity": {
"description": "The number of items in the purchase.",
"minimum": 0,
"type": "integer",
"title": "quantity"
}
},
"required": [
"id",
"quantity"
]
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}
API merchanta powinno odpowiedzieć w czasie poniżej 8 sekund.