Referencia de API
6 min
🛑 ¡Antes de comenzar a codificar las llamadas a la API de Pedido de Piezas, tómate el tiempo para leer las otras secciones!
¡Hay muchos conceptos y detalles que debes conocer antes de usar la API de Pedido de Piezas!
Validate Order
The Validate Order service is used to validate an order before it is created. The validation step allows the dealer to make changes to the order before creating it to correct errors.
👉 The sales_order_no property is always empty in the response.
POST
/parts/order/validate
curl --location 'https://qa-cloud-api.brp.com/dcp/v4/parts/order/validate?language=en-CA' \
--header 'Authorization-Dealer: THE_ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer REPLACE_ME' \
--data '{
"pac_order_id": "048593db-0ca9-4577-8537-9d65705dea05",
"dealer_no": "0000696529",
"dealer_po_no": "PO 0001234",
"shipping_carrier": {
"shipping_condition": "S1"
},
"partner": {
"bill_to_no": "0000696529",
"ship_to_no": "0000696529"
},
"header_texts": [{
"code": "shipping_instruction",
"descr": "Delivery at door 245"
}],
"items": [{
"item_id": "579ba642-1248-4f98-b69d-56afc7fc449f",
"dealer_po_item_no": "A-0010",
"dealer_product_code": "BRP-219701704",
"product_code": "219701704",
"order_qty": 1,
"texts": [{
"code": "memo_field",
"descr": "For customer ABC"
}]
}]
}'
Create Order
Create a new PA&A order.
POST
/parts/order
curl --location 'https://cloud-api.brp.com/dcp/v4/parts/order' \
--header 'Authorization-Dealer: THE_ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer REPLACE_ME' \
--data '{
"pac_order_id": "c8a2d110-8af4-4e61-9f48-85a9f9434695",
"dealer_no": "0000702933",
"dealer_po_no": "PO TEST",
"shipping_carrier": {
"shipping_condition": "S0"
},
"partner": {},
"header_texts": [
{
"code": "shipping_instruction",
"descr": "Delivery at door 245"
}
],
"items": [
{
"item_id": "e5c6dae0-1e7c-450e-86ed-035e88aa4fc3",
"dealer_po_item_no": "A-0010",
"dealer_product_code": "BRP-703500973",
"product_code": "703500973",
"order_qty": 1,
"texts": [
{
"code": "memo_field",
"descr": "Multi valid"
}
]
}
]
}'
Check Order
Get the result/response of the call to the Validate or Create service to check/determine the actual backend system result of the Validate/Create call.
👉 The sales_order_no property in the response is always empty if Check is called to get the status of a Validate request.
GET
/parts/order/check/{pac_order_id}
curl --location 'https://qa-cloud-api.brp.com/dcp/v4/parts/order/check/66ef5239-8f6d-4b50-98d8-87aaea74a7b2' \
--header 'Dealer-Number: 0000691813' \
--header 'Authorization-Dealer: THE_ACCESS_TOKEN' \
--header 'Authorization: Bearer REPLACE_ME'
Get Orders
Get a list of PA&A orders based on search criterias.
GET
/parts/orders
curl --location 'https://qa-cloud-api.brp.com/dcp/v4/parts/orders?creation_date_to=2023-07-18&creation_date_from=2023-07-01&dealer_no=0000702933&limit=3' \
--header 'Authorization-Dealer: THE_ACCESS_TOKEN' \
--header 'Authorization: Bearer REPLACE_ME' Get Order
❗ V4 Only ❗
Get one parts order using the sales order number.
GET
/parts/order/{sales_order_no}
curl --location 'https://qa-cloud-api.brp.com/dcp/v4/parts/order/1030383058?dealer_no=0000702933' \
--header 'Authorization-Dealer: THE_ACCESS_TOKEN' \
--header 'Authorization: Bearer REPLACE_ME' Cancel Order Line
Cancel an order line.
POST
/parts/order/cancel
curl --location 'https://qa-cloud-api.brp.com/dcp/v4/parts/order/cancel?language=fr-CA' \
--header 'Authorization-Dealer: THE_ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer REPLACE_ME' \
--data '{
"pac_order_id": "051MX1Ie7kw9jR0dwDIo5G",
"dealer_no": "0000702933",
"items": [
{
"item_id": "0050568414A81EEE89B5B050CD53B21B"
}
]
}'Get Backorders
❗ V4 Only ❗
Get a list of PA&A orders with at least one backordered part.
👉 Since the number of parts order with backordered parts is limited, there is no page and limit query parameters with this endpoint.
GET
/parts/backorders
curl --location 'https://qa-cloud-api.brp.com/dcp/v4/parts/orders?creation_date_to=2024-03-208&creation_date_from=2024-01-01&dealer_no=0000702933' \
--header 'Authorization-Dealer: THE_ACCESS_TOKEN' \
--header 'Authorization: Bearer REPLACE_ME' Tablas de referencia
Languages
Language in ISO language code (ISO-639-1 + ISO 3166-1)
Format: xx-XX
xx: language code in lowercase
XX: country code in uppercase
Language code values supported
Code | Language |
|---|---|
de | German |
en | English |
es | Spanish |
fi | Finnish |
fr | French |
it | Italian |
nl | Dutch |
no | Norwegian |
pt | Portuguese (Brazil) |
sv | Swedish |