Modify Delivery API
The Modify Delivery API can be used to modify shipments that are on their way to the recipient. Shipments can be stopped and returned to the sender, they can be rerouted to a new delivery address and it is possible to change the cash on delivery amount. We support all sender countries with recipients in Norway, Sweden and Denmark for Stop Delivery and Change Address. Detailed overview of our services can be found below.
Authentication
To integrate with the Bring APIs, you will need a Mybring user account with an API key. Information about prerequisites and authentication headers can be found on the general API Getting Started page.
Formats
REST XML/JSON over HTTP.
Common criteria
There are some events or value added services that will make Modify Delivery services unavailable.
Any of the following events should not already be present on the shipment:
- Damaged
- Deviation
- Returned
- Delivered
- Lost
- Partly delivered
- Stop shipment
- In transit (to final destination)
- Home Delivery ordered
Any of the following value added services (VAS) should not already be present on the shipment:
- Optional pickup point (0010)
- Parcel locker (0011)
- Home delivery from pickup point (1158)
- Home delivery redirect (1159)
- Parcel locker Norway (1298)
- Ibox Sweden (1337)
- Parcel locker same day (1373)
Supported services
Service | Service code | Stop shipment | Change COD | Change Address |
---|---|---|---|---|
Bedriftspakke dør - dør innland | 1000 | Yes | Yes | No |
Bedriftspakke Ekspress over natten | 1002 | Yes | Yes | No |
Servicepakke | 1202 | Yes | Yes | No |
På døren | 1736 | Yes | Yes | No |
Bedriftspakke flerkolli | 1988 | Yes | Yes | No |
Bedriftspakke standard | 3500 | Yes | Yes | No |
Ekspress neste dag | 4850 | Yes | No | No |
Pakke til bedrift | 5000 | Yes | No | Yes |
Pakke levert hjem | 5600 | Yes | No | Yes |
Pakke til hentested | 5800 | Yes | Yes | Yes |
Parcel Locker | 5801 | Yes | No | Yes |
Business parcel | 0330 | Yes | No | Yes |
Business parcel bulk | 0332 | Yes | No | Yes |
Business pallet | 0336 | Yes | No | Yes |
Pickup parcel | 0340 | Yes | No | Yes |
Pickup parcel bulk | 0342 | Yes | No | Yes |
Home delivery parcel | 0349 | Yes | No | Yes |
Limitations
- Service codes 03XX is not supported for shipments addressed within Norway (domestic Norway shipments).
- Bulk services 0332 and 0342 are not valid domestically in Denmark.
- Modify cash on delivery is only available for recipients in Norway.
Endpoints
https://www.mybring.com
Usage | Method | Endpoint |
---|---|---|
Allowed modifications | GET |
/modify-delivery/allowed-modification
|
Change recipient address of delivery | POST |
/modify-delivery/modifications/address
|
Get the cost for changing address on a shipment. | GET |
/modify-delivery/modifications/changeAddress/price/{shipmentNumber}/{newPostalCode}
|
Get city | GET |
/modify-delivery/modifications/city
|
Change cash on delivery | POST |
/modify-delivery/modifications/cod
|
Update Contact Details | POST |
/modify-delivery/modifications/contactDetails
|
Get modifications history | GET |
/modify-delivery/modifications/customer/{customer}
|
Current recipient address | GET |
/modify-delivery/modifications/fetchChangeAddressData/{shipmentNumber}
|
Stop shipment | POST |
/modify-delivery/modifications/stop
|
OpenAPI document
https://www.qa.mybring.com/modify-delivery/api-docsAllowed modifications
https://www.mybring.com/modify-delivery/allowed-modification
Get the list of allowed modifications on a shipment along with failure causes.
Request
query parameters
-
q
Required -
- Description
- Shipment number
- Type
- string
- Example
q=707262014721
Responses
Response examples
Available modifications
{
"allowedModifications": [
"MODIFY_COD",
"CHANGE_ADDRESS"
],
"failureCauses": {
"STOP_DELIVERY": [
"PRODUCT_NOT_VALID_FOR_REQUEST"
]
},
"userLang": "en"
}
Shipment not found
{
"code": "404",
"message": "No tracking details for query SHIPMENT_NUMBER",
"title": "NOT_FOUND"
}
Change recipient address of delivery
https://www.mybring.com/modify-delivery/modifications/address
This is used to change the recipient delivery address.
Criteria
The following events should not be present on the shipment:- Loaded for Delivery
- Partly delivered due to damage
- Home delivery ordered by recipient
- Alternativt utleveringssted (0010)
- Mottakerbestilt hjemlevering (1158, 1159)
Request
Body schema
Media type: application/json
-
changeAddressFee
Required - number
-
currencyCode
Required - string
-
Required
- object
-
-
addressLine1
Required - string
-
addressLine2
- string
-
city
Required - string
-
countryCode
Required - string
- Enum
NO
SE
DK
-
emailAddress
- string
-
phoneNumber
- string
-
postalCode
Required - string
-
-
Required
- object
-
-
addressLine1
Required - string
-
addressLine2
- string
-
city
Required - string
-
countryCode
Required - string
- Enum
NO
SE
DK
-
postalCode
Required - string
-
-
shipmentNumber
Required - string
Responses
Request examples
Change recipient address
{
"changeAddressFee": "This is the cost for changing the address on delivery . The value can be fetched by calling the below service 'Get price for change address'.",
"newAddress": {
"addressLine1": "ADDRESS_LINE_1",
"addressLine2": "ADDRESS_LINE_1 CAN BE NULL OR EMPTY",
"city": "OSLO",
"countryCode": "NO",
"emailAddress": " IF NO CHANGE THEN SEND A SPACE",
"phoneNumber": " IF NO CHANGE THEN SEND A SPACE",
"postalCode": "0121"
},
"oldAddress": {
"addressLine1": "ADDRESS_LINE_1",
"addressLine2": "ADDRESS_LINE_2",
"city": "CITY",
"countryCode": "NO",
"postalCode": "2212"
},
"shipmentNumber": "SHIPMENT_NUMBER"
}
Response examples
{
"code": "201",
"message": "Successfully submitted the change address request",
"title": "CREATED"
}
Forbidden
{
"code": "403",
"message": "Forbidden request for modify delivery for SHIPMENT_NUMBER",
"title": "FORBIDDEN"
}
Shipment not found
{
"code": "404",
"message": "No tracking details for query SHIPMENT_NUMBER",
"title": "NOT_FOUND"
}
Modification not allowed
{
"code": "412",
"message": "Shipment is no longer eligible for modification.",
"title": "PRECONDITION_FAILED"
}
Get the cost for changing address on a shipment.
https://www.mybring.com/modify-delivery/modifications/changeAddress/price/{shipmentNumber}/{newPostalCode}
Get the cost for changing address on a shipment. Currently the price for changing address is a fixed amount. It will give exactly the same amount as in the example below.
Request
path parameters
-
shipmentNumber
Required -
- Type
- string
-
newPostalCode
Required -
- Type
- string
Responses
Response examples
Successful
{
"currencyCode": "DKK",
"price": "206.25",
"requestType": "CHANGE_ADDRESS"
}
Unable to handle request for change address
{
"code": "400",
"message": "Bad Request for query SHIPMENT_NUMBER, can't be fetched for given shipment.",
"title": "BAD_REQUEST"
}
Forbidden
{
"code": "403",
"message": "Forbidden request for modify delivery for SHIPMENT_NUMBER",
"title": "FORBIDDEN"
}
Shipment not found
{
"code": "404",
"message": "No tracking details for query SHIPMENT_NUMBER",
"title": "NOT_FOUND"
}
Get city
https://www.mybring.com/modify-delivery/modifications/city
Get city if valid postal code
Request
query parameters
-
pnr
Required -
- Type
- string
-
country
Required -
- Type
- string
Responses
Response examples
Valid Example
"OSLO"
Invalid Example
{
"body": {
"code": "400",
"message": "There is problem accessing address book",
"title": "BAD_REQUEST"
},
"headers": {},
"status": "BAD_REQUEST"
}
Change cash on delivery
https://www.mybring.com/modify-delivery/modifications/cod
This is used to change the cash on delivery amount on the shipment
Request
Body schema
Media type: application/json
-
changeCodFee
Required - number
-
currencyCode
Required - string
-
newCodAmount
Required - number
-
shipmentNumber
Required - string
Responses
Request examples
Change COD
{
"newCodAmount": "123.45",
"shipmentNumber": "SHIPMENT_NUMBER"
}
Response examples
Successfully submitted change of delivery order
{
"code": "201",
"message": "Successfully submitted the change in cash on delivery request",
"title": "CREATED"
}
Unable to handle request for CoD
{
"code": "400",
"message": "Unable to handle request for change CoD for SHIPMENT_NUMBER",
"title": "BAD_REQUEST"
}
Forbidden
{
"code": "403",
"message": "Forbidden request for modify delivery for SHIPMENT_NUMBER",
"title": "FORBIDDEN"
}
Shipment not found
{
"code": "404",
"message": "No tracking details for query SHIPMENT_NUMBER",
"title": "NOT_FOUND"
}
Update Contact Details
https://www.mybring.com/modify-delivery/modifications/contactDetails
This is used to update contact details (phone number, email or both) on a shipment
Request
Body schema
Media type: application/json
-
consignmentNumber
Required - string
-
email
- string
- object
-
-
recipientEmailAddress
- string
-
recipientMobileNumber
- string
-
-
phoneNumber
- string
Responses
Request examples
Update Contact Details
{
"consignmentNumber": "CONSIGNMENTNUMBER",
"email": "email@test.com",
"phoneNumber": "+47XXXXXXXX"
}
Response examples
Successfully updated provided contact details
{
"code": "201",
"message": "Successfully submitted Update Contact Details request",
"title": "CREATED"
}
Unable to handle request for CoD
{
"code": "400",
"message": "Unable to handle request for Update Contact Details request for CONSIGNMENT NUMBER",
"title": "BAD_REQUEST"
}
Forbidden
{
"code": "403",
"message": "Forbidden request for modify delivery for SHIPMENT_NUMBER",
"title": "FORBIDDEN"
}
Shipment not found
{
"code": "404",
"message": "No tracking details for query SHIPMENT_NUMBER",
"title": "NOT_FOUND"
}
Get modifications history
https://www.mybring.com/modify-delivery/modifications/customer/{customer}
Get list of all the shipments for the customer number on which COD, STOP Delivery and Change address have been done.
Request
path parameters
-
customer
Required -
- Type
- string
Responses
Response examples
Modifications history example
{
"request": [
{
"createdTime": "CREATED_TIME",
"newValue": {
"codAmount": "COD_AMOUNT",
"modifyRequestType": "MODIFY_COD"
},
"oldValue": {
"codAmount": "COD_AMOUNT",
"modifyRequestType": "MODIFY_COD"
},
"packageNumber": "ITEM_NUMBER",
"recipientName": "RECIPIENT_NAME",
"requestType": "MODIFY_COD",
"senderCustomerNumber": "SENDER_CUSTOMER_NUMBER",
"shipmentNumber": "SHIPMENT_NUMBER",
"userName": "USER_WHO_PERFORMED_THE_OPERATION"
},
{
"createdTime": "CREATED_TIME",
"newValue": null,
"oldValue": null,
"packageNumber": "ITEM_NUMBER",
"recipientName": "RECIPIENT_NAME",
"requestType": "STOP_DELIVERY",
"senderCustomerNumber": "SENDER_CUSTOMER_NUMBER",
"shipmentNumber": "SHIPMENT_NUMBER",
"userName": "USER_WHO_PERFORMED_THE_OPERATION"
},
{
"createdTime": "CREATED_TIME",
"newValue": null,
"oldValue": null,
"packageNumber": "ITEM_NUMBER",
"recipientName": "RECIPIENT_NAME",
"requestType": "STOP_DELIVERY",
"senderCustomerNumber": "SENDER_CUSTOMER_NUMBER",
"shipmentNumber": "SHIPMENT_NUMBER",
"userName": "USER_WHO_PERFORMED_THE_OPERATION"
},
{
"createdTime": "CREATED_TIME",
"newValue": {
"addressLine1": "ADDRESS_LINE1",
"addressLine2": "ADDRESS_LINE2",
"city": "CITY",
"countryCode": "NO",
"emailAddress": "IF CHANGE DONE THEN VALUE ELSE null",
"modifyRequestType": "CHANGE_ADDRESS",
"phoneNumber": "IF CHANGE DONE THEN VALUE ELSE null",
"postalCode": "POSTAL_CODE"
},
"oldValue": {
"addressLine1": "ADDRESS_LINE1",
"addressLine2": "ADDRESS_LINE2",
"city": "CITY",
"countryCode": "NO",
"modifyRequestType": "CHANGE_ADDRESS",
"postalCode": "POSTAL_CODE"
},
"packageNumber": "ITEM_NUMBER",
"recipientName": "RECIPIENT_NAME",
"requestType": "CHANGE_ADDRESS",
"senderCustomerNumber": "SENDER_CUSTOMER_NUMBER",
"shipmentNumber": "SHIPMENT_NUMBER",
"userName": "USER_WHO_PERFORMED_THE_OPERATION"
}
],
"selectCustomer": "CUSTOMER_NUMBER",
"userCustomers": []
}
Current recipient address
https://www.mybring.com/modify-delivery/modifications/fetchChangeAddressData/{shipmentNumber}
Get the current recipient address on the shipment.
Request
path parameters
-
shipmentNumber
Required -
- Type
- string
cookie parameters
-
mybring_session
-
- Type
- string
Responses
Response examples
{
"addressLine1": "ADDRESS_LINE_1",
"addressLine2": "ADDRESS_LINE_2",
"city": "CITY",
"country": "COUNTRY",
"countryCode": "COUNTRY_CODE",
"postalCode": "POSTAL_CODE",
"recipientName": "RECIPIENT_NAME"
}
Shipment not found
{
"code": "404",
"message": "No tracking details for query SHIPMENT_NUMBER",
"title": "NOT_FOUND"
}
Stop shipment
https://www.mybring.com/modify-delivery/modifications/stop
This will stop the shipment and send it back to the sender.
Request
Body schema
Media type: application/json
-
shipmentNumber
Required - string
Responses
Request examples
Stop shipment
{
"shipmentNumber": "SHIPMENT_NUMBER"
}
Response examples
Successfully submitted stop delivery order
{
"code": "201",
"message": "Successfully submitted stop delivery order",
"title": "CREATED"
}
Unable to handle request for stop delivery order
{
"code": "400",
"message": "Unable to handle request for stop shipment for SHIPMENT_NUMBER",
"title": "BAD_REQUEST"
}
Forbidden
{
"code": "403",
"message": "Forbidden request for modify delivery for SHIPMENT_NUMBER",
"title": "FORBIDDEN"
}
Shipment not found
{
"code": "404",
"message": "No tracking details for query SHIPMENT_NUMBER",
"title": "NOT_FOUND"
}