---
title: Register Shipment
slug: api-marketplace/register-shipment
createdAt: 2023-12-22T03:22:19.918Z
---

### Introduction

This API is responsible for registering WayBill for a particular Account code and Courier partner Id. Once registered, the WayBill number in conjunction with Courier partner Id can be used to track the updates on the corresponding shipment.

### cURL

:::CodeblockTabs
Production

```curl
curl --location 'https://api.signzy.app/api/v3/underwriting/register-shipment' \
--header 'Authorization: <Auth Token>' \
--header 'Content-Type: application/json' \
--data '{
    "courierPartnerId": <Courier Partner Id>,
    "wayBill": "<Waybill>",
    "accountCode": "<Account Code>",
    "callbackUrl": "<Callback Url>"
}'
```

Pre-Production

```curl
curl --location 'https://api-preproduction.signzy.app/api/v3/underwriting/register-shipment' \
--header 'Authorization: <Auth Token>' \
--header 'Content-Type: application/json' \
--data '{
    "courierPartnerId": <Courier Partner Id>,
    "wayBill": "<WayBill>",
    "accountCode": "<Account Code>",
    "callbackUrl": "<Callback Url>"
}'
```
:::

### Request Headers

| Key           | Value            |
| ------------- | ---------------- |
| Authorization | shared by Signzy |
| Content-type  | application/json |

### Request Body

```json
{
    "wayBill": "RM973467046IN",
    "courierPartnerId": 1001,
    "accountCode": "IndiaPost_A"
}
```

| PARAMETERS       | DESCRIPTION                                                                                                                                         | TYPE    | VALUE (COMPULSORY OR OPTIONAL) |
| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | ------------------------------ |
| wayBill          | The tracking number for the shipment                                                                                                                | String  | COMPULSORY                     |
| courierPartnerId | The Id of the Courier Partner                                                                                                                       | Number  | COMPULSORY                     |
| accountCode      | Account Code for which the corresponding wayBill exists                                                                                             | String  | COMPULSORY                     |
| callbackUrl      | A valid Url to receive updates on shipment status for the corresponding wayBill. A callbackUrl can be registered against an Account Code only once. | String  | OPTIONAL                       |

### Response Data

:::CodeblockTabs
200 OK

```json
{
    "meta": {
        "status": 200,
        "message": "Waybill already registered",
        "success": true
    },
    "result": {
        "trackingId": 943358821,
        "securityKey": "5f107022-5654-407a-80e6-70b935b39144"
    }
}
```
:::

| PARAMETERS         | DESCRIPTION                                                   | TYPE    | VALUE (COMPULSORY OR OPTIONAL) |
| ------------------ | ------------------------------------------------------------- | ------- | ------------------------------ |
| meta.status        | Status code of the response                                   | Number  | COMPULSORY                     |
| meta.message       | Denotes the message (including errors)                        | String  | COMPULSORY                     |
| meta.success       | Whether the request is successful or not                      | Boolean | COMPULSORY                     |
| result.            | Tracking Id of the newly registered waybill stored internally | Number  | COMPULSORY                     |
| result.securityKey | UUID string for the security key of the order                 | String  | COMPULSORY                     |

NOTE: Above fields are Compulsory during 200 OK Response.&#x20;

### Sample Status Codes And Messages

:::CodeblockTabs
200 OK

```json
{
    "meta": {
        "status": 200,
        "message": "Waybill already registered",
        "success": true
    },
    "result": {
        "trackingId": 943358821,
        "securityKey": "5f107022-5654-407a-80e6-70b935b39144"
    }
}

1. When valid wayBill, courierPartnerId, accountCode
```

400

```json
{
    "error": {
        "reason": "ERROR",
        "status": 400,
        "message": "Incorrect courierPartnerId/accountCode passed!",
        "type": "Bad Request",
        "statusCode": 400,
        "name": "error"
    }
}

1. Incorrect courierPartnerId/accountCode passed!
2. 'courierPartnerId' must be a number
3. 'accountCode' must be a string
4. 'wayBill' must be a string
5. 'accountCode' is not allowed to be empty
6. 'wayBill' is not allowed to be empty
7. Callback url is already registered for account code - <Account Code>
```

401

```json
{
    "message": "Invalid authentication credentials"
}
```

409

```json
{
    "error": {
        "reason": "Error",
        "status": 409,
        "message": "Unable to fetch data from upstream",
        "type": "Conflict",
        "statusCode": 409,
        "name": "error"
    }
}
```

500

```json
{
    "error": {
        "reason": "ERROR",
        "status": 500,
        "message": "Internal Server Error",
        "type": "Internal Server Error",
        "statusCode": 500,
        "name": "error"
    }
}
```
:::

***

