Update Shipment Order With Exts
PUThttps://api.test.pio.com/api/v1/shipment_orders
ext_shipment_order_id and (ext_order_channel_id or order_channel_id) is required when using this endpoint.
Request
Responses
- 200
- 401
- 403
- 404
- 422
Successful Response
`unauthorized`: Invalid or no credentials where supplied.
`could_not_validate_credentials`: Could not validate credentials.
`shipping_connector_not_found`: No shipping connector found for matching organization.
<br>`shipping_rate_not_found`: A shipping rate was not found with the given id.
<br>`order_channel_not_found`: The requested order channel does not exist.
`order_channel_mismatch`: The given order_channel_id does not match the given ext_order_channel_id.
<br>`missing_ext_shipment_order_id`: Missing ext_shipment_order_id in the payload.
<br>`missing_order_channel_id_or_ext_order_channel_id`: one of order_channel_id or ext_order_channel_id must be set.
<br>`duplicate_line_items`: There are line items provided with the same ids.
Authorization: oauth2
name: OAuth2AuthorizationCodeBearertype: oauth2flows: {
"authorizationCode": {
"scopes": {},
"authorizationUrl": "/raw/openapi_auth/authorize_form?client_id=<your-client-id>&redirect_uri=<your-redirect-url>",
"tokenUrl": "/api/v1/oauth/access_token"
}
}
- python
- php
- curl
- javascript
- nodejs
- ruby
- java
- csharp
- go
- c
- dart
- kotlin
- swift
- objective-c
- ocaml
- r
- powershell
- HTTP.CLIENT
- REQUESTS
import http.client
import json
conn = http.client.HTTPSConnection("api.test.pio.com")
payload = json.dumps({
"ext_shipment_order_id": "string",
"line_items": [
{
"sku": "string",
"ext_shipment_order_line_item_id": "string",
"ext_order_line_item_id": "string",
"quantity": 0
}
],
"destination": {
"address1": "string",
"address2": "string",
"city": "string",
"company": "string",
"country": "string",
"email": "string",
"first_name": "string",
"last_name": "string",
"phone": "string",
"province": "string",
"zip": "string"
},
"ext_order_id": "string",
"ext_order_channel_id": "string",
"order_channel_id": 0,
"ext_shipping_rate_id": "string",
"shipping_rate_id": 0
})
headers = {
'Content-Type': 'application/json',
'Accept': 'application/json',
'Authorization': 'Bearer <TOKEN>'
}
conn.request("PUT", "/api/v1/shipment_orders", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
ResponseClear