Modify delivery

Introduction

The modify delivery api is used to modify a shipment currently on it’s way.
Below are the various modifications (which will be API calls) supported:
- Stop shipment.
- Change cash on deivery.

Authentication

The Modify delivery API requires authentication for all its endpoints. See the getting started guide on authentication if you’re not sure what this means.

Header Example Comment
X-MyBring-API-Uid john.doe@example.com Mybring login ID
X-MyBring-API-Key 1234abc-abcd-1234-5678-abcd1234abcd Mybring login’s API key
X-Bring-Client-URL https://example.com/ A URL that sort of identifies where you’re using the APIs.

Those headers must be present for authenticating requests.

Overview of endpoints

Base URL

https://www.mybring.com/modify-delivery
Method Endpoint Usage
GET /allowed-modification List of allowed modifications, along with failure causes.
POST /stop-shipment Stop a shipment and return to sender.
POST /change-cod Change cash on delivery amount to be paid.

Allowed modifications

URL

https://www.mybring.com/modify-delivery/allowed-modification

Request params

Query parameter Type Description
q string

Required. Shipment number to be checked for.


Example: 707262014721

Response

(200)

{
  "allowedModifications": [
    "MODIFY_COD"
  ],
  "failureCauses": {
    "STOP_DELIVERY": [
      "PRODUCT_NOT_VALID_FOR_REQUEST"
    ]
  },
  "userLang": "en"
}

Stop shipment

URL

https://www.mybring.com/modify-delivery/stop-shipment

Request body

{
  "shipmentNumber": "SHIPMENT_NUMBER"
}

Response

(200)

{
  "code": "201",
  "title": "CREATED",
  "message": "Successfully submitted stop delivery order"
}

Change cash on delivery

URL

https://www.mybring.com/modify-delivery/change-cod

Request body

{
  "newCodAmount": "123.45",
  "shipmentNumber": "SHIPMENT_NUMBER"
}

Response

(200)


{
  "code": "201",
  "title": "CREATED",
  "message": "Successfully submitted the change in cash on delivery request"
}