Shipment service (2.0.0)

Download OpenAPI specification:Download

fabric V2 Shipment for multi-tenant service provides real time update of shipments. This help you gain control of your customers' delivery experience; there by, improve customer loyalty and retention.

Shipment

Create Shipment

Creates shipment. An event is generated at this point to Invoice service for invoice creation. The response includes shipmentId, which is required for subsequent calls such as GET /shipment/{shipmentId} and PUT /shipment/{shipmentId}.

SecurityAuthorization
Request
header Parameters
required
object (XSiteContext)

Represents single or multi-tenancy

Request Body schema: application/json
shipmentNum
string

Shipment number

allocationId
string

Allocation ID for an order, generated from allocation service

invoiceId
string

fabric-generated Invoice ID

poNumber
string

Purchase order number (generally, vendor-generated)

vendorId
string

Vendor ID

statusCode
string

Shipment status code

Enum: "SHIPMENT_CREATED" "SHIPMENT_CANCELLED" "PICKUP_CREATED" "PICKUP_COMPLETED" "SHIPMENT_RETURN_PENDING" "SHIPMENT_RETURN_RECEIVED" "SHIPMENT_PARTIALLY_DELIVERED" "SHIPMENT_DELIVERED"
type
string

Shipment type

Enum: "STANDARD" "RESHIP" "RETURN" "SCRATCH" "PICKUP"
reshipmentReasonCode
string

Reason code for reshipment

shipDate
string <date-time>

Shipping time

locationNum
string

Location number from the location service

locationType
string

Location type based on location service such as store, distribution center (DC)

totalCartons
integer <int32>

Total number of cartons

masterTrackingNumber
string

Main tracking number, to track fulfillment of all the orders

shipToId
string

Ship-to ID

object (ShipmentShipToAddress)

Details of delivery address

Array of objects (ShipmentRecipient)
Array of objects (CartonDto)
Array of objects (ScratchedItemDto)
Array of objects (ShipmentAuditLog)
object

Shipment attributes

Responses
200

Ok

400

Bad Request

404

Shipment Not Found

500

Internal Server Error

post/shipment/
Request samples
application/json
{
  • "shipmentNum": "78974156816152",
  • "allocationId": "112345678912340",
  • "invoiceId": "5674156816152",
  • "poNumber": "1125",
  • "vendorId": "56",
  • "statusCode": "SHIPMENT_CREATED",
  • "type": "STANDARD",
  • "reshipmentReasonCode": "Order went missing",
  • "shipDate": "2022-06-06T07:58:30.996Z",
  • "locationNum": "132412",
  • "locationType": "DC",
  • "totalCartons": 2,
  • "masterTrackingNumber": "TX112345678",
  • "shipToId": "1",
  • "shipToAddress": {
    },
  • "recipient": [
    ],
  • "cartons": [
    ],
  • "scratchedItems": [
    ],
  • "auditLogs": [
    ],
  • "attributes": {
    }
}
Response samples
application/json
{
  • "shipmentId": "627963716b19511e8a3a631b",
  • "shipmentNum": "78974156816152",
  • "invoiceId": "5674156816152",
  • "allocationId": "112345678912340",
  • "orderNumber": [
    ],
  • "poNumber": "1125",
  • "vendorId": "56",
  • "statusCode": "SHIPPED",
  • "type": "STANDARD",
  • "reshipmentReasonCode": "Order went missing",
  • "shipDate": "2022-06-06T07:58:30.996Z",
  • "locationNum": "132412",
  • "locationType": "DC",
  • "totalCartons": 2,
  • "masterTrackingNumber": "TX112345678",
  • "shipToId": "1",
  • "shipToAddress": {
    },
  • "recipient": [
    ],
  • "cartons": [
    ],
  • "scratchedItems": [
    ],
  • "createdAt": "2022-06-06T07:58:30.996Z",
  • "updatedAt": "2022-06-06T07:58:30.996Z",
  • "auditLogs": [
    ],
  • "attributes": {
    }
}

Get Shipment

Gets shipment details by shipment ID

SecurityAuthorization
Request
path Parameters
shipmentId
required
string

24-character, fabric-generated shipment ID

Example: 627963716b19511e8a3a631b
header Parameters
required
object (XSiteContext)

Represents single or multi-tenancy

Responses
200

Ok

400

Bad Request

404

Object Not Found!

500

Internal Server Error

get/shipment/{shipmentId}
Response samples
application/json
{
  • "shipmentId": "627963716b19511e8a3a631b",
  • "shipmentNum": "78974156816152",
  • "invoiceId": "5674156816152",
  • "allocationId": "112345678912340",
  • "orderNumber": [
    ],
  • "poNumber": "1125",
  • "vendorId": "56",
  • "statusCode": "SHIPPED",
  • "type": "STANDARD",
  • "reshipmentReasonCode": "Order went missing",
  • "shipDate": "2022-06-06T07:58:30.996Z",
  • "locationNum": "132412",
  • "locationType": "DC",
  • "totalCartons": 2,
  • "masterTrackingNumber": "TX112345678",
  • "shipToId": "1",
  • "shipToAddress": {
    },
  • "recipient": [
    ],
  • "cartons": [
    ],
  • "scratchedItems": [
    ],
  • "createdAt": "2022-06-06T07:58:30.996Z",
  • "updatedAt": "2022-06-06T07:58:30.996Z",
  • "auditLogs": [
    ],
  • "attributes": {
    }
}

Update shipment

Updates shipment details by shipment ID

SecurityAuthorization
Request
path Parameters
shipmentId
required
string
Example: 627963716b19511e8a3a631b
header Parameters
required
object (XSiteContext)

Represents single or multi-tenancy

Request Body schema: application/json
shipmentId
string

24-character fabric-generated unique ID of shipment

shipmentNum
string

Shipment number (external)

invoiceId
string

fabric-generated Invoice ID

allocationId
string

Allocation ID for an order, generated from allocation service

orderNumber
Array of strings

Order number. It's usually generated by another system, such as an external checkout system.

poNumber
string

Purchase order number (generally, vendor-generated)

vendorId
string

Vendor ID

statusCode
string

Shipment status code

Enum: "SHIPMENT_CREATED" "SHIPMENT_CANCELLED" "PICKUP_CREATED" "PICKUP_COMPLETED" "SHIPMENT_RETURN_PENDING" "SHIPMENT_RETURN_RECEIVED" "SHIPMENT_PARTIALLY_DELIVERED" "SHIPMENT_DELIVERED"
type
string

shipment type

Enum: "STANDARD" "RESHIP" "RETURN" "SCRATCH" "PICKUP"
reshipmentReasonCode
string

Reason code for reshipment

shipDate
string <date-time>

Time of shipping

locationNum
string

location number from location service to get exact address.

locationType
string

Location type based on location service such as store, distribution center (DC)

totalCartons
integer <int32>

Total number of cartons

masterTrackingNumber
string

Main tracking number, to track fulfillment of all the orders

shipToId
string

Ship-to ID refers to item's delivery address

object (ShipmentShipToAddress)

Details of delivery address

Array of objects (ShipmentRecipient)
Array of objects (ShipmentCarton)
Array of objects (ShipmentScratchedItem)

details of scratched items

createdAt
string <date-time>

Time of shipment creation

updatedAt
string <date-time>

Time of last update

Array of objects (ShipmentAuditLog)

Details of audit logs

object

Attribute details for additional information

Responses
200

Ok

400

Bad Request

404

Object Not Found!

500

Internal Server Error

put/shipment/{shipmentId}
Request samples
application/json
{
  • "shipmentId": "627963716b19511e8a3a631b",
  • "shipmentNum": "78974156816152",
  • "invoiceId": "5674156816152",
  • "allocationId": "112345678912340",
  • "orderNumber": [
    ],
  • "poNumber": "1125",
  • "vendorId": "56",
  • "statusCode": "SHIPPED",
  • "type": "STANDARD",
  • "reshipmentReasonCode": "Order went missing",
  • "shipDate": "2022-06-06T07:58:30.996Z",
  • "locationNum": "132412",
  • "locationType": "DC",
  • "totalCartons": 2,
  • "masterTrackingNumber": "TX112345678",
  • "shipToId": "1",
  • "shipToAddress": {
    },
  • "recipient": [
    ],
  • "cartons": [
    ],
  • "scratchedItems": [
    ],
  • "createdAt": "2022-06-06T07:58:30.996Z",
  • "updatedAt": "2022-06-06T07:58:30.996Z",
  • "auditLogs": [
    ],
  • "attributes": {
    }
}
Response samples
application/json
{
  • "shipmentId": "627963716b19511e8a3a631b",
  • "shipmentNum": "78974156816152",
  • "invoiceId": "5674156816152",
  • "allocationId": "112345678912340",
  • "orderNumber": [
    ],
  • "poNumber": "1125",
  • "vendorId": "56",
  • "statusCode": "SHIPPED",
  • "type": "STANDARD",
  • "reshipmentReasonCode": "Order went missing",
  • "shipDate": "2022-06-06T07:58:30.996Z",
  • "locationNum": "132412",
  • "locationType": "DC",
  • "totalCartons": 2,
  • "masterTrackingNumber": "TX112345678",
  • "shipToId": "1",
  • "shipToAddress": {
    },
  • "recipient": [
    ],
  • "cartons": [
    ],
  • "scratchedItems": [
    ],
  • "createdAt": "2022-06-06T07:58:30.996Z",
  • "updatedAt": "2022-06-06T07:58:30.996Z",
  • "auditLogs": [
    ],
  • "attributes": {
    }
}

Update package tracking

Updates details of package tracking.

SecurityAuthorization
Request
header Parameters
required
object (XSiteContext)

Represents single or multi-tenancy

Request Body schema: application/json
event
string

Event status

eventId
string

24-character system-generated unique event ID

timestamp
string

Time of event creation

shipmentCarrier
string

Shipment carrier name. Applicable in case of a different carrier

location
string

Current location

object

shipment notes

Responses
200

Ok

400

Bad Request

404

Object Not Found!

500

Internal Server Error

post/shipment/tracking
Request samples
application/json
{
  • "event": "picked up",
  • "eventId": "627963716b19511e8a3a631b",
  • "timestamp": "2019-09-30T07:58:30.996Z",
  • "shipmentCarrier": "FEDEX",
  • "location": "Reno, NV",
  • "notes": {
    }
}
Response samples
application/json
[
  • {
    }
]

Filter shipments

Gets shipment details based on filter criteria

SecurityAuthorization
Request
header Parameters
required
object (XSiteContext)

Represents single or multi-tenancy

Request Body schema: application/json
limit
integer <int32>
Default: 10

Ending record number (from the offset number) in the response. When no value is provided, the default value is 100.

offset
integer <int64>
Default: 0

Starting number of the record (within the total number of records) in the response. Offset is zero-based. That is, the 10th record is at offset 9 starting from the 0th record. When no value is provided, the default value is 0

sortBy
string
Default: "updatedAt"

Sorting criteria based on item attributes

sortDirection
string
Default: "desc"

Sorting direction such as ascending or descending

Enum: "asc" "desc"
required
object
Default: {}

JSON to do filtration of records.
Note To filter records json structure should be similar to target entity structure i.e order, shipment etc.

Responses
200

Ok

400

Bad Request

404

Object Not Found!

500

Internal Server Error

post/shipment/query
Request samples
application/json
{
  • "limit": 10,
  • "offset": 0,
  • "sortBy": "updatedAt",
  • "sortDirection": "desc",
  • "filters": {
    }
}
Response samples
application/json
{
  • "count": 100,
  • "limit": 10,
  • "offset": 1
}

Activate gift card

Activates gift cards (or coupons) added by shoppers during shipment creation.

SecurityAuthorization
Request
header Parameters
required
object (XSiteContext)

Represents single or multi-tenancy

Request Body schema: application/json
shipmentId
string

Shipment ID

Array of objects (ShipmentGiftCardItem)
Responses
200

Ok

post/shipment/gift-card/activation
Request samples
application/json
{
  • "shipmentId": "78974156816152",
  • "items": [
    ]
}
Response samples
application/json
{
  • "shipmentId": "627963716b19511e8a3a631b",
  • "shipmentNum": "78974156816152",
  • "invoiceId": "5674156816152",
  • "allocationId": "112345678912340",
  • "orderNumber": [
    ],
  • "poNumber": "1125",
  • "vendorId": "56",
  • "statusCode": "SHIPPED",
  • "type": "STANDARD",
  • "reshipmentReasonCode": "Order went missing",
  • "shipDate": "2022-06-06T07:58:30.996Z",
  • "locationNum": "132412",
  • "locationType": "DC",
  • "totalCartons": 2,
  • "masterTrackingNumber": "TX112345678",
  • "shipToId": "1",
  • "shipToAddress": {
    },
  • "recipient": [
    ],
  • "cartons": [
    ],
  • "scratchedItems": [
    ],
  • "createdAt": "2022-06-06T07:58:30.996Z",
  • "updatedAt": "2022-06-06T07:58:30.996Z",
  • "auditLogs": [
    ],
  • "attributes": {
    }
}

Acknowledge gift card activation

Acknowledges gift card activation is successful

SecurityAuthorization
Request
header Parameters
required
object (XSiteContext)

Represents single or multi-tenancy

Request Body schema: application/json
shipmentId
string

Shipment ID

Array of objects (ShipmentGiftCardItem)
Responses
200

Ok

400

Bad Request

404

Object Not Found!

500

Internal Server Error

post/shipment/gift-card/activation-acknowledge
Request samples
application/json
{
  • "shipmentId": "78974156816152",
  • "items": [
    ]
}
Response samples
application/json
{
  • "shipmentId": "627963716b19511e8a3a631b",
  • "shipmentNum": "78974156816152",
  • "invoiceId": "5674156816152",
  • "allocationId": "112345678912340",
  • "orderNumber": [
    ],
  • "poNumber": "1125",
  • "vendorId": "56",
  • "statusCode": "SHIPPED",
  • "type": "STANDARD",
  • "reshipmentReasonCode": "Order went missing",
  • "shipDate": "2022-06-06T07:58:30.996Z",
  • "locationNum": "132412",
  • "locationType": "DC",
  • "totalCartons": 2,
  • "masterTrackingNumber": "TX112345678",
  • "shipToId": "1",
  • "shipToAddress": {
    },
  • "recipient": [
    ],
  • "cartons": [
    ],
  • "scratchedItems": [
    ],
  • "createdAt": "2022-06-06T07:58:30.996Z",
  • "updatedAt": "2022-06-06T07:58:30.996Z",
  • "auditLogs": [
    ],
  • "attributes": {
    }
}

Acknowledge Shipment

Acknowledges the tracking is created.

SecurityAuthorization
Request
Request Body schema: application/json
shipmentId
string

Shipment ID

attributes
object
Responses
200

Ok

400

Bad Request

404

Object Not Found!

500

Internal Server Error

post/acknowledge
Request samples
application/json
{
  • "shipmentId": "78974156816152",
  • "attributes": { }
}
Response samples
application/json
{
  • "shipmentId": "627963716b19511e8a3a631b",
  • "shipmentNum": "78974156816152",
  • "invoiceId": "5674156816152",
  • "allocationId": "112345678912340",
  • "orderNumber": [
    ],
  • "poNumber": "1125",
  • "vendorId": "56",
  • "statusCode": "SHIPPED",
  • "type": "STANDARD",
  • "reshipmentReasonCode": "Order went missing",
  • "shipDate": "2022-06-06T07:58:30.996Z",
  • "locationNum": "132412",
  • "locationType": "DC",
  • "totalCartons": 2,
  • "masterTrackingNumber": "TX112345678",
  • "shipToId": "1",
  • "shipToAddress": {
    },
  • "recipient": [
    ],
  • "cartons": [
    ],
  • "scratchedItems": [
    ],
  • "createdAt": "2022-06-06T07:58:30.996Z",
  • "updatedAt": "2022-06-06T07:58:30.996Z",
  • "auditLogs": [
    ],
  • "attributes": {
    }
}

Reshipment

Create reshipment

Creates reshipment when package goes missing before it is shipped

SecurityAuthorization
Request
header Parameters
required
object (XSiteContext)

Represents single or multi-tenancy

Request Body schema: application/json
shipmentNum
string

Shipment number

allocationId
string

Allocation ID for an order, generated from allocation service

invoiceId
string

fabric-generated Invoice ID

poNumber
string

Purchase order number (generally, vendor-generated)

vendorId
string

Vendor ID

statusCode
string

Shipment status code

Enum: "SHIPMENT_CREATED" "SHIPMENT_CANCELLED" "PICKUP_CREATED" "PICKUP_COMPLETED" "SHIPMENT_RETURN_PENDING" "SHIPMENT_RETURN_RECEIVED" "SHIPMENT_PARTIALLY_DELIVERED" "SHIPMENT_DELIVERED"
type
string

Shipment type

Enum: "STANDARD" "RESHIP" "RETURN" "SCRATCH" "PICKUP"
reshipmentReasonCode
string

Reason code for reshipment

shipDate
string <date-time>

Shipping time

locationNum
string

Location number from the location service

locationType
string

Location type based on location service such as store, distribution center (DC)

totalCartons
integer <int32>

Total number of cartons

masterTrackingNumber
string

Main tracking number, to track fulfillment of all the orders

shipToId
string

Ship-to ID

object (ShipmentShipToAddress)

Details of delivery address

Array of objects (ShipmentRecipient)
Array of objects (CartonDto)
Array of objects (ScratchedItemDto)
Array of objects (ShipmentAuditLog)
object

Shipment attributes

Responses
200

Ok

400

Bad Request

404

Object Not Found!

500

Internal Server Error

post/shipment/reship
Request samples
application/json
{
  • "shipmentNum": "78974156816152",
  • "allocationId": "112345678912340",
  • "invoiceId": "5674156816152",
  • "poNumber": "1125",
  • "vendorId": "56",
  • "statusCode": "SHIPMENT_CREATED",
  • "type": "STANDARD",
  • "reshipmentReasonCode": "Order went missing",
  • "shipDate": "2022-06-06T07:58:30.996Z",
  • "locationNum": "132412",
  • "locationType": "DC",
  • "totalCartons": 2,
  • "masterTrackingNumber": "TX112345678",
  • "shipToId": "1",
  • "shipToAddress": {
    },
  • "recipient": [
    ],
  • "cartons": [
    ],
  • "scratchedItems": [
    ],
  • "auditLogs": [
    ],
  • "attributes": {
    }
}
Response samples
application/json
{
  • "shipmentId": "627963716b19511e8a3a631b",
  • "shipmentNum": "78974156816152",
  • "invoiceId": "5674156816152",
  • "allocationId": "112345678912340",
  • "orderNumber": [
    ],
  • "poNumber": "1125",
  • "vendorId": "56",
  • "statusCode": "SHIPPED",
  • "type": "STANDARD",
  • "reshipmentReasonCode": "Order went missing",
  • "shipDate": "2022-06-06T07:58:30.996Z",
  • "locationNum": "132412",
  • "locationType": "DC",
  • "totalCartons": 2,
  • "masterTrackingNumber": "TX112345678",
  • "shipToId": "1",
  • "shipToAddress": {
    },
  • "recipient": [
    ],
  • "cartons": [
    ],
  • "scratchedItems": [
    ],
  • "createdAt": "2022-06-06T07:58:30.996Z",
  • "updatedAt": "2022-06-06T07:58:30.996Z",
  • "auditLogs": [
    ],
  • "attributes": {
    }
}