Relay API v2 (2.0.85)

Download OpenAPI specification:Download

Overview

The Relay v2 Shipping API is designed to let retailers and marketplaces start shipping with Relay fast.

Setup

You'll need to contact Relay at j.hoon@relaytech.co or r.ladbrook@relaytech.co to request an API key and register your retailer locations (warehouses).

Authentication

The Relay API uses HTTP Bearer Authentication. This means that to let us know it's really you calling the Relay API, you'll need to include a header in your request of the form Relay-Authorization: Bearer $YOUR_API_KEY. We also require that all requests to the API be made over HTTPS.

API conventions

We attempt to follow a few conventions throughout the API:

  • Metric system: Weights, measures, distances, etc. are all reported using SI units and their multiples/submultiples.
  • UTC time: Dates and times are all reported in Coordinated Universal Time.
  • ISO formats: Where a commonly-used ISO format exists to represent structured data, such as dates, country codes, etc., we aim to use these standard formats.

Tracking

The current shipment status and its history can be accessed through the status and events fields respectively. Events offer more context for status changes but please note that multiple events can map to the same status.

Status Explanation Description in API response
pending The shipment is waiting in our system. The shipment can be cancelled while in this status. Order details received
cancelled The shipment has been cancelled. Relay will not collect or attempt to deliver the shipment. Cancelled by the sender
delivered The shipment has been delivered to the end customer. Delivered
failed The shipment failed the delivery attempt to the end customer. Delivery attempt failed
scheduled The shipment has been assigned a delivery route. Scheduled for delivery
out_for_delivery The shipment is on its assigned delivery route. Out for delivery with our courier
lost The shipment location is unknown and therefore considered as lost in transit. Unable to locate your order
manifested_not_received The shipment was expected to be collected but was not. Order not received from the sender
delayed The shipment is delayed. Delayed
discarded The parcel is not suitable for delivery. Damaged parcel discarded by Relay
inbound_return The delivery is being sent back to the retailer. Delivery back to retailer
damaged_upon_receipt The shipment is damaged. Damaged upon receipt by Relay
received The shipment is confirmed to be collected. Order received from the sender
max_attempts_reached_rts_pending All delivery attempts have failed so the shipment will be returned to the sender. Maximum delivery attempts reached
customer_rejected_rts_pending The end customer refused to accept the delivery. Customer refused delivery
hsc_received_rts_parcel The return to sender shipment has reached the Relay Hub. Parcel returned to Relay Hub,
hsc_received_inbound_return The parcel has been received at the Relay Hub. Parcel received at Relay Hub
rts_parcel_dispatched The return to sender shipment has been dispatched to the sender. Parcel returned to the sender
rts_pending The shipment is being returned to the sender. Returning to the sender
customer_collected The customer has collected the parcel. Customer collected the parcel
preparing_customer_collection The parcel is being prepared for customer collection. Preparing for customer collection
awaiting_customer_collection The shipment is ready for customer collection at the pitstop. Ready for customer collection at pitstop
customer_collection_delayed The customer collection is delayed. Pickup Delayed
received_at_pitstop The shipment is received at a pitstop. Received at pitstop
awaiting_parcel_drop_off The shipment is awaiting a parcel drop off. Expecting Your Parcel
driver_collected_parcel_from_pitstop The courier has collected the parcel from the pitstop. Courier Collected Your Parcel
rts_awaiting_customer_collection The return to sender parcel is ready for customer collection at the pitstop. Ready for customer collection at pitstop
rts_customer_collected The customer has collected the return to sender parcel. Customer collected the parcel
rts_failed The return to sender shipment has failed. Failed to return to the sender
processed_at_gateway The parcel has been processed at a Relay gateway. Parcel was processed at a Relay gateway
entered_relay_network The parcel has entered the Relay network. Parcel has entered the Relay network

Event Categories

Category Description Example Events
shipment_created Shipment creation events new_shipment_to_customer, new_c2c_shipment
shipment_received Package sorting and routing events sortation_scan, sortation_intake_scan
in_transit In-transit movement events pitstop_shipment_checkin, lm_out_for_delivery, lm_delivery_failed
delivered Final delivery outcome events handed_to_customer, left_in_safe_place, collected_by_customer
error Problem and error state events agent_flagged_as_lost, retailer_cancelled, collection_expired

Events

Events provide more context for status changes.

Event Name Description Category
new_shipment_to_customer Shipment created for delivery to a customer shipment_created
new_shipment_to_retailer Shipment created for delivery to a retailer shipment_created
new_c2c_shipment Customer-to-customer shipment created shipment_created
new_l2l_collection_shipment Shipment created for delivery from a marketplace retailer to a customer shipment_created
sortation_scan Package scanned during sorting process shipment_received
pitstop_shipment_checkin Individual shipment checked into pitstop in_transit
lm_out_for_delivery Shipment out for delivery by courier in_transit
lm_delivery_failed Delivery attempt failed in_transit
handed_to_customer Package successfully delivered to customer delivered
left_in_safe_place Package left in customer's designated safe location delivered
handed_to_neighbour Package delivered to customer's neighbour delivered
pod_upload Proof of delivery images uploaded delivered
agent_flagged_as_lost Agent marked package as lost error
automatic_cleanup_lost System automatically marked shipment as lost error
agent_flagged_as_return_to_sender Agent marked package for return to sender error
sortation_exception_return_to_sender Package returned to sender due to sorting exception error
sortation_exception_discard Package discarded due to sorting exception error
too_many_attempts_rts Package returned to sender after too many delivery attempts error
retailer_cancelled Shipment cancelled by retailer error
sortation_intake_scan Package received at sorting facility shipment_received
rts_dispatch_scan Return to sender package dispatched delivered
customer_refused_delivery_rts Customer refused delivery, returning to sender error
inbound_intake_scan Package scanned at inbound facility shipment_received
handed_to_retailer Package delivered to retailer location delivered
collected_by_customer Package collected by customer from pickup point delivered
collected_by_sender Package collected by sender delivered
awaiting_customer_collection Package ready for customer collection at pitstop in_transit
awaiting_sender_collection Package ready for sender collection in_transit
customer_collection_requested Customer has requested to collect package from a pitstop in_transit
collection_expiry_reminder Reminder sent that collection window is expiring soon in_transit
collection_expired Collection window expired error
assign_to_route Shipment assigned to a delivery route in_transit
lm_delivery_did_not_attempt Delivery was not attempted error
rts_intake_scan Return to sender package received at facility in_transit
drop_off_expired Drop-off window expired error
shipment_discarded Package discarded due to damage or other issues error
sortation_box_scan_received Package box scan received at sortation shipment_received
pitstop_destination_redirected Shipment destination redirected to a different pitstop in_transit
pitstop_origin_redirected Shipment origin redirected to a different pitstop in_transit

pudos

Locations where end customers can pick up / drop off their parcels

List Pudos

Authorizations:
HTTPRelayHTTPBasicHTTPBearer
query Parameters
services
Array of strings (Services)
Items Enum: "customer_delivery" "customer_collection" "customer_return" "customer_to_customer" "customer_to_customer_offboarding" "customer_drop_off" "l2l_drop_off" "customer_collection_pause" "customer_to_customer_pause"
Postcode (string) or Postcode (null) (Postcode)
Latlon (string) or Latlon (null) (Latlon)
radius_m
integer (Radius M)
Default: 8000
limit
integer (Limit)
Default: 30
header Parameters
Forwarded (string) or Forwarded (null) (Forwarded)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

List All Pudos

Authorizations:
HTTPRelayHTTPBasicHTTPBearer
query Parameters
Array of Services (strings) or Services (null) (Services)
header Parameters
Forwarded (string) or Forwarded (null) (Forwarded)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

shipments

Manage creating and tracking shipments

Create Shipment

This endpoint is used to create a new shipment with the specified details, including origin, destination, parcel information, and service type.

You can optionally specify a label configuration to control how the label is generated. You can also decide not to generate a label in this request.

Authorizations:
HTTPRelayHTTPBasicHTTPBearer
header Parameters
Forwarded (string) or Forwarded (null) (Forwarded)
Request Body schema: application/json
required
Box Number (string) or Box Number (null) (Box Number)

The box number for the delivery that contains this shipment. This should be applied to every shipment covered by the same box.

required
ExternalApiCustomerLocation (object) or ExternalApiPudoLocationRequiredCode (object) or ExternalApiRetailerLocation (object) (Destination)

The location to which this shipment is destined.

SafePlace (object) or null

A safe place to put the parcel if the shipment cannot be delivered to the destination address.

End Customer Promise Date (string) or End Customer Promise Date (null) (End Customer Promise Date)

Date of the customer delivery promise. What is the last possible date the retailer has committed to the customer that the delivery will occur.

FMOrigin (string) or null

The first mile origin type for the shipment (international or domestic).

LabelConfig (object) or null
required
ExternalApiPudoLocationWithHandoverInput (object) or ExternalApiRetailerLocation (object) or ExternalApiMarketplaceRetailerLocation (object) (Origin)

The location from which this shipment originates. This could be a retailer or pudo location

required
object (Parcel-Input)
Retailer Brand (string) or Retailer Brand (null) (Retailer Brand)
Retailer Brand Id (string) or Retailer Brand Id (null) (Retailer Brand Id)
Retailer Code (string) or Retailer Code (null) (Retailer Code)

A unique code identifying the retailer initiating the shipment.

service_type
required
string (ExternalApiInputServiceType)
Enum: "next_day" "two_day" "five_day" "next_day_upgrade" "inbound_return" "customer_to_customer" "customer_drop_off"

The type of delivery service. For example 'next_day', means a shipment created on day T (before the daily cut-off time) will be delivered on day T+1 (e.g. Monday -> Tuesday). As Relay adds more delivery services, we will add more options to this field.

shipper_metadata
any (Shipper Metadata)

Capture miscellaneous events and data on the shipment that does not fit into the existing fields.

Waybill Number (string) or Waybill Number (null) (Waybill Number)

The AWB number for the delivery that contains this shipment. This should be applied to every shipment covered by the same waybill.

Responses

Request samples

Content type
application/json
{
  • "box_number": "string",
  • "destination": {
    },
  • "destination_alternative": {
    },
  • "end_customer_promise_date": "2019-08-24",
  • "fm_origin": "international",
  • "label_config": {
    },
  • "origin": {
    },
  • "parcel": {
    },
  • "retailer_brand": "string",
  • "retailer_brand_id": "string",
  • "retailer_code": "string",
  • "service_type": "next_day",
  • "shipper_metadata": null,
  • "waybill_number": "string"
}

Response samples

Content type
application/json
{
  • "box_number": "string",
  • "code": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "destination": {
    },
  • "destination_alternative": {
    },
  • "end_customer_promise_date": "2019-08-24",
  • "fm_origin": "international",
  • "label": {
    },
  • "origin": {
    },
  • "parcel": {
    },
  • "retailer_brand": "string",
  • "retailer_brand_id": "string",
  • "retailer_code": "string",
  • "service_type": "two_day",
  • "shipper_metadata": null,
  • "sort_centre_code": "string",
  • "waybill_number": "string"
}

Get Shipment Bulk

Authorizations:
HTTPRelayHTTPBasicHTTPBearer
header Parameters
Forwarded (string) or Forwarded (null) (Forwarded)
Request Body schema: application/json
required
codes
required
Array of strings (Codes)

The list of shipment tracking codes to get shipment details for.

Responses

Request samples

Content type
application/json
{
  • "codes": [
    ]
}

Response samples

Content type
application/json
[
  • {
    }
]

Get Shipment Status Bulk

Authorizations:
HTTPRelayHTTPBasicHTTPBearer
header Parameters
Forwarded (string) or Forwarded (null) (Forwarded)
Request Body schema: application/json
required
codes
required
Array of strings (Codes)

The list of shipment tracking codes to get statuses for.

Responses

Request samples

Content type
application/json
{
  • "codes": [
    ]
}

Response samples

Content type
application/json
[
  • {
    }
]

Bulk Patch Barcode Waybill

Bulk update barcodes with their associated waybill and box numbers.

Authorizations:
HTTPRelayHTTPBasicHTTPBearer
header Parameters
Forwarded (string) or Forwarded (null) (Forwarded)
Request Body schema: application/json
required
required
Array of objects (Boxes)

The boxes and their associated barcodes.

waybill_number
required
string (Waybill Number)

The AWB number that applies to all barcodes in this request.

Responses

Request samples

Content type
application/json
{
  • "boxes": [
    ],
  • "waybill_number": "string"
}

Response samples

Content type
application/json
{
  • "message": "string",
  • "success": true
}

Update Shipment Wms Data Bulk

Update WMS data for a list of shipments

Authorizations:
HTTPRelayHTTPBasicHTTPBearer
header Parameters
Forwarded (string) or Forwarded (null) (Forwarded)
Request Body schema: application/json
required
required
Array of objects (Updates)

The list of shipment WMS data updates.

Responses

Request samples

Content type
application/json
{
  • "updates": [
    ]
}

Response samples

Content type
application/json
{
  • "message": "string",
  • "success": true
}

Get Shipment

Authorizations:
HTTPRelayHTTPBasicHTTPBearer
path Parameters
code
required
string (Code)
header Parameters
Forwarded (string) or Forwarded (null) (Forwarded)

Responses

Response samples

Content type
application/json
{
  • "box_number": "string",
  • "created_at": "2019-08-24T14:15:22Z",
  • "destination": {
    },
  • "destination_alternative": {
    },
  • "end_customer_promise_date": "2019-08-24",
  • "fm_origin": "international",
  • "origin": {
    },
  • "parcel": {
    },
  • "retailer_brand": "string",
  • "retailer_brand_id": "string",
  • "retailer_code": "string",
  • "service_type": "two_day",
  • "shipper_metadata": null,
  • "sort_centre_code": "string",
  • "waybill_number": "string"
}

Patch Shipment

Update the details of an existing shipment.

Authorizations:
HTTPRelayHTTPBasicHTTPBearer
path Parameters
code
required
string (Code)
header Parameters
Forwarded (string) or Forwarded (null) (Forwarded)
Request Body schema: application/json
required
Box Number (string) or Box Number (null) (Box Number)
End Customer Promise Date (string) or End Customer Promise Date (null) (End Customer Promise Date)
shipper_metadata
any (Shipper Metadata)
Waybill Number (string) or Waybill Number (null) (Waybill Number)

Responses

Request samples

Content type
application/json
{
  • "box_number": "string",
  • "end_customer_promise_date": "2019-08-24",
  • "shipper_metadata": null,
  • "waybill_number": "string"
}

Response samples

Content type
application/json
{
  • "message": "string",
  • "success": true
}

Cancel Shipment

Authorizations:
HTTPRelayHTTPBasicHTTPBearer
path Parameters
code
required
string (Code)
header Parameters
Forwarded (string) or Forwarded (null) (Forwarded)

Responses

Response samples

Content type
application/json
{
  • "message": "string"
}

Get Shipment Delivery

Authorizations:
HTTPRelayHTTPBasicHTTPBearer
path Parameters
code
required
string (Code)
header Parameters
Forwarded (string) or Forwarded (null) (Forwarded)

Responses

Response samples

Content type
application/json
{
  • "calls_to_customer": [
    ],
  • "courier_note": "string",
  • "delivery_failures": [
    ],
  • "pods": [
    ],
  • "safe_place": {
    },
  • "status": "pending"
}

Get Shipment Label

Authorizations:
HTTPRelayHTTPBasicHTTPBearer
path Parameters
code
required
string (Code)
query Parameters
ShipmentLabelType (string) or Mode (null) (Mode)
LabelFileFormat (string) or Fileformat (null) (Fileformat)
header Parameters
Forwarded (string) or Forwarded (null) (Forwarded)

Responses

Response samples

Content type
application/json
null

Get Shipment Status

Authorizations:
HTTPRelayHTTPBasicHTTPBearer
path Parameters
code
required
string (Code)
header Parameters
Forwarded (string) or Forwarded (null) (Forwarded)

Responses

Response samples

Content type
application/json
{
  • "events": [
    ],
  • "last_scan_location": "string",
  • "last_updated_at": "2019-08-24T14:15:22Z",
  • "pods": [
    ],
  • "shipment_code": "string",
  • "status": "active"
}

Update Shipment Wms Data

Update WMS data for a shipment

Authorizations:
HTTPRelayHTTPBasicHTTPBearer
path Parameters
code
required
string (Code)
header Parameters
Forwarded (string) or Forwarded (null) (Forwarded)
Request Body schema: application/json
required
WMSContainerData (object) or null
Array of Items (objects) or Items (null) (Items)
Label Created At (string) or Label Created At (null) (Label Created At)
Order Allocated To Wave At (string) or Order Allocated To Wave At (null) (Order Allocated To Wave At)
Order Packed At (string) or Order Packed At (null) (Order Packed At)
Order Picked At (string) or Order Picked At (null) (Order Picked At)
Order Scanned Into Container At (string) or Order Scanned Into Container At (null) (Order Scanned Into Container At)
WMSOriginRetailerData (object) or null
WMSVolumiserData (object) or null

Responses

Request samples

Content type
application/json
{
  • "container": {
    },
  • "items": [
    ],
  • "label_created_at": "2019-08-24T14:15:22Z",
  • "order_allocated_to_wave_at": "2019-08-24T14:15:22Z",
  • "order_packed_at": "2019-08-24T14:15:22Z",
  • "order_picked_at": "2019-08-24T14:15:22Z",
  • "order_scanned_into_container_at": "2019-08-24T14:15:22Z",
  • "origin_retailer": {
    },
  • "volumiser": {
    }
}

Response samples

Content type
application/json
{
  • "message": "string",
  • "success": true
}

Get Shipment Collection

Get customer collection details for a shipment including QR code, collection code, and pitstop information.

Authorizations:
HTTPRelayHTTPBasicHTTPBearer
path Parameters
tracking_number
required
string (Tracking Number)
header Parameters
Forwarded (string) or Forwarded (null) (Forwarded)

Responses

Response samples

Content type
application/json
{
  • "collection_code": "string",
  • "pitstop": {
    },
  • "qr_code": "string"
}

services

The services Relay supports between two points

postcodes

Network coverage and exclusions

Get Postcode Exclusions

Get postcode exclusions for the authenticated shipper.

Returns additions (newly excluded postcodes) and removals (no longer excluded postcodes) based on the timestamp parameter.

If no timestamp is provided, returns all current exclusions as additions.

Polling behavior:

When an outcode is removed from exclusions (e.g., becomes whitelisted), any blacklisted postcodes within that outcode are automatically included as additions. This ensures that individual postcode exclusions are not accidentally cleared when their parent outcode becomes supported.

Authorizations:
HTTPRelayHTTPBasicHTTPBearer
query Parameters
Timestamp (integer) or Timestamp (null) (Timestamp)

Unix timestamp in seconds. If provided, returns only changes since this timestamp. If not provided, returns all current exclusions.

header Parameters
Forwarded (string) or Forwarded (null) (Forwarded)

Responses

Response samples

Content type
application/json
{
  • "additions": [
    ],
  • "last_updated_at": 0,
  • "removals": [
    ]
}

webhooks

Webhook subscription management and event notifications

Webhook Payload

When events occur, Relay sends a POST request to your webhook URL with a JSON payload:

{
  "event_name": "handed_to_customer",
  "event_category": "delivered",
  "occurred_at": "2024-01-15T14:30:00Z",
  "shipment_code": "RELAY123456",
  "status": "delivered",
  "status_description": "Delivered",
  "event_history": [...],
  "event_details": {...}
}

Event Details

Some webhook events include additional details in an event_details field (only available with the default presenter).

Events with Event Details

Event Name Field Description
pod_upload pods List of proof of delivery images with signed URLs (valid for 7 days)
customer_collection_requested address_change Old and new address details when customer requests pitstop collection
pitstop_destination_redirected address_change Old and new address details when shipment destination is redirected to a different pitstop
pitstop_origin_redirected address_change Old and new address details when shipment origin is redirected to a different pitstop
new_c2c_shipment handover_details Handover code and window for parcel drop-off at the origin pitstop
awaiting_customer_collection handover_details Handover code, QR code URL, pudo code, and collection window for customer collection
awaiting_sender_collection handover_details Handover code, QR code URL, pudo code, and collection window for sender collection (RTS)
pitstop_shipment_checkin handover_details PUDO code of the pitstop where the parcel was dropped off (only for received_at_pitstop status)
lm_delivery_failed delivery_failure Failure reason and description when a last-mile delivery attempt fails

Address Change Example

{
  "old_address": {
    "organisation": null,
    "line1": "123 Example Street",
    "line2": "Flat 4",
    "line3": null,
    "line4": null,
    "town": "London",
    "county": null,
    "postcode": "SW1A 1AA",
    "country_iso": "GBR",
    "lat": null,
    "lon": null
  },
  "old_pudo_code": "PST001",
  "new_address": {
    "organisation": null,
    "line1": "123 Example Street",
    "line2": "Flat 4",
    "line3": null,
    "line4": null,
    "town": "London",
    "county": null,
    "postcode": "SW1A 1AA",
    "country_iso": "GBR",
    "lat": null,
    "lon": null
  },
  "new_pudo_code": "PST002",
  "changed_at": "2024-01-15T14:30:00.000000+00:00"
}

Proof of Delivery Example

[{
  "image": "https://storage.googleapis.com/example/pod-image.jpg",
  "captured_at": "2024-01-15T14:30:00.000000+00:00",
  "coordinates": {
    "lat": 51.5074,
    "lon": -0.1278
  }
}, {
  "image": "https://storage.googleapis.com/example/pod-image-2.jpg",
  "captured_at": "2024-01-15T14:30:00.000000+00:00",
  "coordinates": {
    "lat": 51.5074,
    "lon": -0.1278
  }
}]

Handover Details Example

{
  "handover_code": "RELHO12345678",
  "handover_qr_code": "https://relay-production.relaytechapis.co/v0/customer-portal/qr-code?collection_code=RELHO12345678",
  "pudo_code": "PST001",
  "handover_window_begins": "2024-01-15T08:00:00.000000+00:00",
  "handover_window_ends": "2024-01-22T18:00:00.000000+00:00"
}

Delivery Failure Example

{
  "failure_reason": "no_answer_from_customer",
  "failure_reason_description": "No Answer from Customer"
}

Webhook Signature

All webhook requests include an x-relay-signature header containing an HMAC-SHA256 signature of the payload. Use your webhook signing key to verify the signature and ensure the request is from Relay.

List Webhook Subscriptions

Authorizations:
HTTPRelayHTTPBasicHTTPBearer
query Parameters
Retailer Code (string) or Retailer Code (null) (Retailer Code)
header Parameters
Forwarded (string) or Forwarded (null) (Forwarded)

Responses

Response samples

Content type
application/json
{
  • "webhooks": [
    ]
}

Update Webhook Subscription

Authorizations:
HTTPRelayHTTPBasicHTTPBearer
header Parameters
Forwarded (string) or Forwarded (null) (Forwarded)
Request Body schema: application/json
required
WebhookCustomConfig (object) or null
ExternalApiWebhookPresenter (string) or null
Include Event History (boolean) or Include Event History (null) (Include Event History)
Retailer Code (string) or Retailer Code (null) (Retailer Code)
Array of Subscribed Events (strings) or Subscribed Events (null) (Subscribed Events)
webhook_uid
required
string <uuid> (Webhook Uid)

Responses

Request samples

Content type
application/json
{
  • "custom_config": {
    },
  • "custom_presenter": "default",
  • "include_event_history": true,
  • "retailer_code": "string",
  • "subscribed_events": [
    ],
  • "webhook_uid": "e00a5c66-81c3-4565-a0c1-eaf5f6e2efe1"
}

Response samples

Content type
application/json
{
  • "created_at": "2019-08-24T14:15:22Z",
  • "custom_config": {
    },
  • "custom_presenter": "default",
  • "detail": "string",
  • "include_event_history": true,
  • "subscribed_events": [
    ],
  • "updated_at": "2019-08-24T14:15:22Z",
  • "webhook_uid": "e00a5c66-81c3-4565-a0c1-eaf5f6e2efe1",
  • "webhook_url": "http://example.com"
}

Create Webhook Subscription

Authorizations:
HTTPRelayHTTPBasicHTTPBearer
header Parameters
Forwarded (string) or Forwarded (null) (Forwarded)
Request Body schema: application/json
required
required
object (WebhookCustomConfig)
custom_presenter
required
string (ExternalApiWebhookPresenter)
Enum: "default" "simple"

Allows API consumers to choose between a simplified or more detailed webhook data format.

Include Event History (boolean) or Include Event History (null) (Include Event History)
Retailer Code (string) or Retailer Code (null) (Retailer Code)
subscribed_events
required
Array of strings (Subscribed Events)
Items Enum: "new_shipment_to_customer" "new_shipment_to_retailer" "new_c2c_shipment" "new_l2l_collection_shipment" "sortation_scan" "pitstop_shipment_checkin" "lm_out_for_delivery" "lm_delivery_failed" "handed_to_customer" "left_in_safe_place" "handed_to_neighbour" "pod_upload" "agent_flagged_as_lost" "automatic_cleanup_lost" "agent_flagged_as_return_to_sender" "sortation_exception_return_to_sender" "sortation_exception_discard" "too_many_attempts_rts" "retailer_cancelled" "sortation_intake_scan" "rts_dispatch_scan" "customer_refused_delivery_rts" "inbound_intake_scan" "handed_to_retailer" "collected_by_customer" "collected_by_sender" "awaiting_customer_collection" "awaiting_sender_collection" "customer_collection_requested" "collection_expiry_reminder" "collection_expired" "assign_to_route" "lm_delivery_did_not_attempt" "rts_intake_scan" "drop_off_expired" "shipment_discarded" "sortation_box_scan_received" "pitstop_destination_redirected" "pitstop_origin_redirected"
webhook_url
required
string <uri> (Webhook Url) [ 1 .. 2083 ] characters

Responses

Request samples

Content type
application/json
{
  • "custom_config": {
    },
  • "custom_presenter": "default",
  • "include_event_history": true,
  • "retailer_code": "string",
  • "subscribed_events": [
    ],
  • "webhook_url": "http://example.com"
}

Response samples

Content type
application/json
{
  • "created_at": "2019-08-24T14:15:22Z",
  • "custom_config": {
    },
  • "custom_presenter": "default",
  • "detail": "string",
  • "include_event_history": true,
  • "subscribed_events": [
    ],
  • "updated_at": "2019-08-24T14:15:22Z",
  • "webhook_uid": "e00a5c66-81c3-4565-a0c1-eaf5f6e2efe1",
  • "webhook_url": "http://example.com"
}

Delete Webhook Subscription

Authorizations:
HTTPRelayHTTPBasicHTTPBearer
path Parameters
webhook_uid
required
string (Webhook Uid)
query Parameters
Retailer Code (string) or Retailer Code (null) (Retailer Code)
header Parameters
Forwarded (string) or Forwarded (null) (Forwarded)

Responses

Response samples

Content type
application/json
{
  • "detail": "string",
  • "webhook_uid": "e00a5c66-81c3-4565-a0c1-eaf5f6e2efe1"
}