Order

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:

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
Identifier of sales order (There can be several sales orders to one order)
orderId
Identifier of order
orderCouponCode
Code of discount coupon
customerPurchaseNumber
customer purchase number
productLines sku name lineNumber quantityOrdered quantityOrderedInContentUnit contentUnitCode lastChange pkwiu splitPayment cableType gtu manufacturerId productLineId parentProductLineId
product information sku of product name of product number of line Quantity of products in order unit. DEPRECATED. Use quantityOrderedInContentUnit instead Quantity of products in content unit the unit of content in which the product is ordered Returns date in UTC timezone. example: 2000-01-30T20:50:30Z Polish Classification of Goods and Services information on the breakdown of payment for the order whether the ordered product is a type of cable product codes of groups of goods and services identifier of manufacturer identifier of product line identifier of parent product line
productLinesprice netUnitPrice netContentUnitPrice grossContentUnitPrice basePriceNet basePriceDiscount basePriceType netValue taxValue taxRate grossValue netCatalogPrice catalogPriceDiscount
product line prices Net unit price net content unit price gross content unit price net base price base price doscount base price type (Catalog) net value tax value tax rate gross value net catalog price catalog price discount
price additionalCosts type contentUnitNet contentUnitTax contentUnitGross totalNet totalTax totalGross alreadyIncludedInPrice
additional costs type of additional cost net content unit price tax content unit gross content unit price total net total tax total gross true or false
productLinesappliedCampaigns campaignId name
information whether the order was subject to a promotional campaign id of campaigns name of campaigns
productLinescurrentInfo slug name url
product information slug of product name of product url of product
productLinescategories id name
category information identifier of category name of category
productLinesbrand id name description
brand information identifier of brand name of brand description of brand
deliveryMethod id externalId deliveryDateRequired deliveryDateConfirmed type pickup
delivery method information identifier of delivery method external identifier of delivery method delivery date indicated by the ordering party delivery date confirmed by the recipient of the order type of delivery method (possible 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
deliveryMethodcost net tax gross
delivery method cost net price tax gross price
deliveryMethodaddress type id name street zipCode city country phone
address of delivery method Type of delivery method (SYSTEM) identifier of delivery method name of delivery method street of delivery method zip code of delivery method city of delivery method country of delivery method phone of delivery method
paymentMethod id externalId transactionId
payment method identifier of payment method external identifier of external ID identifier of transaction
paymentMethodprice net tax gross
price of payment method net price tax gross price
paymentStatus
status of payment - [ PENDING, PAID ]
paymentStatusV2
Przelewy24 status - PENDING, PAID, FAILED, CANCELLED, TIMEOUT
user id name email phone
unused/deprecated field. Preserved for backwards compatibility. do. do. do. do.
creator id externalId type name email phoneNumber branch
information about the person who created this order, it can be a user (buyer) or operator (seller) ID of creator external ID of creator User or operator (If ordered via frontend, this will be user. If via the back office then the operator) name of creator email of creator phone of creator branch of creator
organization id clientId externalId
The customer who places the order identifier of Client identifier of Client (with prefix) external identifier of Client
notes
notes regarding the order
systemComments
system comments
orderChannel
ONLINE(in the case of orders placed via the frontend) or POINT_OF_SALE(in the case of orders placed through the back office)
status
status of shipment
lastChange
date of last change (example 2022-05-18T10:33:16Z)
supplyWarehouseId
Identifier of supply warehouse
supplyWarehouseSupported
Returns information whether the supply warehouse supports sales from ONe. True or false
authorizedPeople email name phone userId
persons authorized to receive the shipment e-mail of authorized person name of authorized person phone of authorized person ID of authorized persons
price deliveryNet productsNet additionalCosts totalNet totalTax totalGross totalWithPaymentMethodNet totalWithPaymentMethodTax totalWithPaymentMethodGross
final prices delivery net price product net price additional cost total net total tax total gross total with payment method net total with payment method tax total with payment method gross
priceadditionalCosts type net tax gross
Additional costs details type of additional costs additional costs net additional costs tax additional costs gross
orderType
ORDER, RFQ
productAvailability
Information about the availability of products in the order. Possible options: ALL_AVAILABLE, SOME_AVAILABLE, NONE_AVAILABLE
createDate
creation date. Example: 2023-01-20T20:50:30ZE

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:
Image without caption
In request you need to put required parameters:
  • shipmentId - query
  • newPaymentStatus - body
Example request:
json
curl -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:
Image without caption
Use the following query parameter to get details about given order shipment:
  • shipmentId
Example request
json
curl -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:
Image without caption
In request you need to put required query parameter:
  • date
  • shipmentId
Example request:
json
curl -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:
Image without caption
In request you need to put required parameters in body:
  • shipmentId
  • quantityShipped
  • sku
Example request:
json
curl -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:
Image without caption
In request you need to put required parameters in body:
  • shipmentId
  • waybills
  • number
Example request:
json
curl -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:
Image without caption
  • shipmentId
  • shipmentStatus
Example request:
json
curl -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"