markShipmentsCourierPaid
Requires permission sales:sales_order:ship.
Record ONE courier payment (date YYYY-MM-DD, method, reference) on many shipments at once (1–500). All or nothing: refused when any shipment is not found, cancelled / booking failed, or already marked paid. Returns the courier charges settled per currency. Recording only — no money moves. Each shipment is audited.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
mutation MarkShipmentsCourierPaid($input: MarkShipmentsCourierPaidInput!) {
markShipmentsCourierPaid(input: $input) {
markedCount
untrackedCount
totals {
amount
currency
shipmentCount
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation MarkShipmentsCourierPaid($input: MarkShipmentsCourierPaidInput!) {\n markShipmentsCourierPaid(input: $input) {\n markedCount\n untrackedCount\n totals {\n amount\n currency\n shipmentCount\n }\n }\n}",
"variables": {
"input": {
"method": "string",
"paidOn": "string",
"shipmentIds": [
"id"
]
}
}
}
EOF
Variables:
{
"input": {
"method": "string",
"paidOn": "string",
"shipmentIds": [
"id"
]
}
}
Response:
{
"data": {
"markShipmentsCourierPaid": {
"markedCount": 0,
"untrackedCount": 0,
"totals": [
{
"amount": "string",
"currency": "string",
"shipmentCount": 0
}
]
}
}
}
markShipmentsCourierPaid(
input: MarkShipmentsCourierPaidInput!
): MarkShipmentsCourierPaidResultGql!
Arguments
markShipmentsCourierPaid.input ● MarkShipmentsCourierPaidInput! non-null input
The details of the mark shipments courier paid request.
Type
MarkShipmentsCourierPaidResultGql object
What a batch of courier payments recorded.