Orders placed in ONE are downloaded from the integration API and sent to the external system in response. When ordering, you can choose the payment method you want to use and the delivery option. The ONE platform also allows you to create an order in the event of unavailability of the product as a result of its lack in stocks. If the quantity of ordered products exceeds the current stock level, the user can choose among two options, sending the order only when the goods are available, or dividing the order into two parts, ordering with available products and the second with unavailable products. When placing an order, the user can choose the person authorized to collect the shipment and the address to which the shipment is to be sent.
The order can be placed via the backoffice (here is an instruction on how to do it) or via the frontend
Table of contents:
GlossaryPUT - Set payment status in shipment's orderGET information about given order shipmentPUT - Change confirmed delivery date in shipmentPUT - Change quantity of shipped products in content units (after converting to order units decimal part is discarded)POST - Add waybills to shipmentPUT - Set shipment status
Glossary
Name | Explanation |
shipmentId | shipment identifier. The number was generated in the ONe system. |
newPaymentStatus | payment status of order. Possible to choose: "PENDING" "PAID" "FAILED" "CANCELLED" "TIMEOUT” |
date | new confirmed delivery date. Format: yyyy-MM-dd. |
quantityChanges :
quantityShipped
sku | change in the quantity of products that have been shipped
quantity shipped in content unit
product sku |
id | |
orderId | |
orderCouponCode | |
customerPurchaseNumber | |
productLines
sku
name
lineNumber
quantityOrdered
quantityOrderedInContentUnit
contentUnitCode
lastChange
pkwiu
splitPayment
cableType
gtu
manufacturerId
productLineId
parentProductLineId
|
Quantity of products in order unit. DEPRECATED. Use quantityOrderedInContentUnit instead
Quantity of products in content unit
Returns date in UTC timezone. example: 2000-01-30T20:50:30Z
Polish Classification of Goods and Services
|
productLines → price
netUnitPrice
netContentUnitPrice
grossContentUnitPrice
basePriceNet
basePriceDiscount
basePriceType
netValue
taxValue
taxRate
grossValue
netCatalogPrice
catalogPriceDiscount | |
price → additionalCosts
type
contentUnitNet
contentUnitTax
contentUnitGross
totalNet
totalTax
totalGross
alreadyIncludedInPrice
| |
productLines →appliedCampaigns
campaignId
name | |
productLines →currentInfo
slug
name
url | |
productLines →categories
id
name | |
productLines →brand
id
name
description | |
deliveryMethod
id
externalId
deliveryDateRequired
deliveryDateConfirmed
type
pickup |
COURIER, CLICK_AND_COLLECT, CROSS_DOCKING, PARCEL_LOCKER
Available when type == CLICK_AND_COLLECT (will be the same as supplyWarehouseId) or type == CROSS_DOCKING or type == PARCEL_LOCKER |
deliveryMethod → cost
net
tax
gross | |
deliveryMethod → address
type
id
name
street
zipCode
city
country
phone | |
paymentMethod
id
externalId
transactionId | |
paymentMethod → price
net
tax
gross | |
paymentStatus | [ PENDING, PAID ] |
paymentStatusV2 | Przelewy24 status - PENDING, PAID, FAILED, CANCELLED, TIMEOUT |
user
id
name
email
phone | |
creator
id
externalId
type
name
email
phoneNumber
branch |
User or operator |
organization
id
clientId
externalId | |
notes | |
systemComments | |
orderChannel | ONLINE, POINT_OF_SALE |
status | |
lastChange | |
supplyWarehouseId | |
supplyWarehouseSupported | Returns information whether the supply warehouse supports sales from ONe |
authorizedPeople
email
name
phone
userId | |
price
deliveryNet
productsNet
additionalCosts
totalNet
totalTax
totalGross
totalWithPaymentMethodNet
totalWithPaymentMethodTax
totalWithPaymentMethodGross | |
price → additionalCosts
type
net
tax
gross | |
orderType | ORDER, RFQ |
productAvailability | ALL_AVAILABLE, SOME_AVAILABLE, NONE_AVAILABLE |
waybills
number
url | |
orderAppliedCampaigns
campaignId
name | |
createDate | example: 2000-01-30T20:50:30Z |
PUT - Set payment status in shipment's order
In this endpoint, it is possible to set or edit the payment status of the order from an external system (e.g. ERP).
In this case use PUT
/api/v1/account/integrations/auth-required/order/payment-status
to update payment status in shipment order.
The diagram below shows the dependency of communicating with the API:
In request you need to put required parameters:
shipmentId
- query
newPaymentStatus
- body
Example request:
jsoncurl -X PUT "https://ph-qa0.one.unity.pl/api/v1/orders/integrations/auth-required/order/payment-status?shipmentId=OF%2F22%2F8%2F2022%2F01" -H "accept: application/json" -H "one-tenant: panelhandlowca" -H "ApiAuth: 547554a42b7f4f52a500f93a15fea8f5:595f59adc32140bbaed64ac709ec3d0e" -H "Content-Type: application/json" -d "{ "newPaymentStatus": "PAID" }"
GET information about given order shipment
In this endpoint, we will receive information about given order shipment with all the details that were provided when placing the order.
In this case use GET
/api/v1/account/integrations/auth-required/order/shipment
to get information about order shipment. The diagram below shows the dependence of communicating with the API:
Use the following query parameter to get details about given order shipment:
shipmentId
Example request
jsoncurl -X GET "https://api-preprod.one.unity.pl/api/v1/orders/integrations/auth-required/order/shipment?shipmentId=2222" -H "accept: application/json" -H "one-tenant: {tenant}" -H "ApiAuth: {apiKey}"
In response we will get details about given order shipment
If there is a connection between products in the order (e.g. cable + drum), the
parentProductLineId
parameter is returned
Example response:
json{ "id": "OF/22/8/2022/01", "orderId": "OF/22/8/2022", "orderCouponCode": null, "customerPurchaseNumber": null, "productLines": [ { "sku": "SIGNY_51504400", "name": "Żarówka MASTER LEDspot LV 20-100W 827 AR111 24D A 2700 K", "lineNumber": "OF/22/8/2022/01/01", "quantityOrdered": 6, "quantityOrderedInContentUnit": 6, "price": { "netUnitPrice": 900, "netContentUnitPrice": 900, "grossContentUnitPrice": 1107, "basePriceNet": 1000, "basePriceDiscount": 10, "basePriceType": "CATALOG", "netValue": 5400, "taxValue": 1242, "taxRate": 23, "grossValue": 6642, "additionalCosts": [], "netCatalogPrice": 1000, "catalogPriceDiscount": 10 }, "contentUnitCode": "C62", "notes": null, "lastChange": "2022-04-25T07:26:41Z", "appliedCampaigns": [], "currentInfo": { "slug": "signy_51504400", "name": "Żarówka MASTER LEDspot LV 20-100W 827 AR111 24D A 2700 K", "url": "/zarowka-master-ledspot-lv-20-100w-827-ar111-24d-a-2700-k-id-signy_51504400" }, "pkwiu": null }, { "sku": "SIGNY_51502000", "name": "Żarówka MASTER LEDspot LV 15-75W 930 AR111 40D A 3000 K 5x6", "lineNumber": "OF/22/8/2022/01/02", "quantityOrdered": 6, "quantityOrderedInContentUnit": 6, "price": { "netUnitPrice": 2250, "netContentUnitPrice": 2250, "grossContentUnitPrice": 2767.5, "basePriceNet": 2500, "basePriceDiscount": 10, "basePriceType": "CATALOG", "netValue": 13500, "taxValue": 3105, "taxRate": 23, "grossValue": 16605, "additionalCosts": [], "netCatalogPrice": 2500, "catalogPriceDiscount": 10 }, "contentUnitCode": "C62", "notes": null, "lastChange": "2022-04-25T07:26:41Z", "appliedCampaigns": [], "currentInfo": { "slug": "signy_51502000", "name": "Żarówka MASTER LEDspot LV 15-75W 930 AR111 40D A 3000 K 5x6", "url": "/zarowka-master-ledspot-lv-15-75w-930-ar111-40d-a-3000-k-5x6-id-signy_51502000" }, "pkwiu": null }, ], "deliveryMethod": { "id": "00000000-0000-4a29-891a-000000000000", "externalId": "COURIER", "deliveryDateRequired": "2022-04-27", "deliveryDateConfirmed": "2022-07-27", "cost": { "net": 0, "tax": 0, "gross": 0 }, "type": "COURIER", "address": { "type": "SYSTEM", "id": "610cd1d9-e8a1-4537-9067-c4617ddb4278", "name": "Allchemia firma handlowo-usługowa", "street": "Nowowiejska", "zipCode": "00-013", "city": "Warszawa", "country": "PL", "phone": "523 234 234" }, "pickupPointId": null }, "paymentMethod": { "id": "44444444-4444-4444-4444-444444444444", "externalId": "CASH_ON_DELIVERY", "transactionId": null, "price": { "net": 50, "tax": 11.5, "gross": 61.5 } }, "paymentStatus": "PAID", "paymentStatusV2": "PAID", "user": { "id": null, "name": "Pan Operator", "email": "operator@one.unity.pl", "phone": "048 111 222 333" }, "creator": { "id": "6c9ee463-4090-47f6-836c-b294e2f077eb", "externalId": null, "type": "OPERATOR", "name": "Pan Operator", "email": "operator@one.unity.pl", "phoneNumber": "048 111 222 333" }, "organization": { "id": "88c5631b-552b-4c79-9804-dfc57a1952e0", "clientId": "org:88c5631b-552b-4c79-9804-dfc57a1952e0", "externalId": "3141" }, "notes": "", "systemComments": null, "orderChannel": "POINT_OF_SALE", "status": "wyslane", "lastChange": "2022-05-18T10:33:16Z", "supplyWarehouseId": "W1CEN", "supplyWarehouseSupported": true, "authorizedPeople": [ { "userId": "e0b9ee2e-eb17-45eb-b8e1-02628e47f184", "email": "Ruby@klient1.pl", "name": "Angelika Stokłosa", "phone": "423 452 533" } ], "price": { "deliveryNet": 0, "productsNet": 23750, "additionalCosts": [], "totalNet": 23750, "totalTax": 5462.5, "totalGross": 29212.5, "totalWithPaymentMethodNet": 23800, "totalWithPaymentMethodTax": 5474, "totalWithPaymentMethodGross": 29274 }, "orderType": "ORDER", "productAvailability": "ALL_AVAILABLE", "waybills": [ { "number": "662030078254043015906536", "url": "https://inpost.pl/sledzenie-przesylek?number=662030078254043015906536" } ], "orderAppliedCampaigns": [], "createDate": "2022-04-25T07:26:41Z" }
PUT - Change confirmed delivery date in shipment
When placing an order, the customer has the option of specifying when he would like to receive the delivery. In this endpoint, it is possible to confirm the date of the delivery. It is very helpful information for the customer who knows when he will receive the goods.
In this case use PUT
/api/v1/account/integrations/auth-required/order/shipment/confirmed-delivery-date
to set / change confirmed delivery date in shipment.
The diagram below shows the dependency of communicating with the API:
In request you need to put required query parameter:
date
shipmentId
Example request:
jsoncurl -X PUT "https://api-preprod.one.unity.pl/api/v1/orders/integrations/auth-required/order/shipment/confirmed-delivery-date?date=2022-07-27&shipmentId=OF%2F22%2F8%2F2022%2F01" -H "accept: application/json" -H "one-tenant: {tenant}" -H "ApiAuth: {apiKey}"
PUT - Change quantity of shipped products in content units (after converting to order units decimal part is discarded)
The next endpoint is used to set or update the quantity of shipped products in content units.
Warning! When we use decimals, the ONe platform will display an integer rounded up, e.g. the value 10.5 = 11, 1.1 = 2.
Use PUT
/api/v1/account/integrations/auth-required/order/shipment/number-of-shipped-products-content-unit
to set / update quantity of shipped products in content units.
The diagram below shows the dependency of communicating with the API:
In request you need to put required parameters in body:
shipmentId
quantityShipped
sku
Example request:
jsoncurl -X PUT "https://api-preprod.one.unity.pl/api/v1/orders/integrations/auth-required/order/shipment/number-of-shipped-products-content-unit" -H "accept: application/json" -H "one-tenant: {tenant}" -H "ApiAuth: {apiKey}" -H "Content-Type: application/json" -d "{ { "shipmentId": "OF/22/8/2022/01", "quantityChanges": [ { "quantityShipped": 1, "sku": "DELTA_ALAS2BRGT" }, { "quantityShipped": 4, "sku": "EZER_7638900421439" } ] }"
POST - Add waybills to shipment
In this endpoint, we have the option of adding the bill of lading number and a link to the carrier's website for easier verification by the customer of the status of the upcoming delivery.
Use POST
/api/v1/account/integrations/auth-required/order/shipment/waybills
to add waybills using the API. The sequence diagram below shows the dependence of communicating with the API when account manager was created in external system:
In request you need to put required parameters in body:
shipmentId
waybills
number
Example request:
jsoncurl -X POST "https://api-preprod.one.unity.pl/api/v1/orders/integrations/auth-required/order/shipment/waybills" -H "accept: application/json" -H "one-tenant: {tenant}" -H "ApiAuth: {apiKey}" -H "one-tenant: {tenant}" -H "ApiAuth: {apiKey}" -H "Content-Type: application/json" -d "{ "shipmentId": "OF/22/8/2022/01", "waybills": [ { "number": "662030078254043015906536", "url": "https://inpost.pl/sledzenie-przesylek?number=662030078254043015906536" } ] }"
PUT - Set shipment status
Usually, each shipment in the company goes through several processes called statuses. It can be e.q. order acceptance, order preparation, order shipment, order pickup. In this endpoint, we can change the statuses on an ongoing basis so that the customer always sees the current status. Click here to go back to these steps.
Use PUT
/api/v1/account/integrations/auth-required/order/status
to update shipment status in external system
The diagram below shows the dependency of communicating with the API:
In request you need to put query parameter:
shipmentId
shipmentStatus
Example request:
jsoncurl -X PUT "https://api-preprod.one.unity.pl/api/v1/orders/integrations/auth-required/order/status?shipmentId=OF%2F22%2F8%2F2022%2F01&shipmentStatus=wyslane" -H "accept: application/json" -H "one-tenant: panelhandlowca" -H "ApiAuth: 547554a42b7f4f52a500f93a15fea8f5:595f59adc32140bbaed64ac709ec3d0e"