openapi: 3.2.0 info: title: Overview Fulfillments API version: 2026-07 summary: API Overview contact: name: AfterShip Support url: https://www.aftership.com/contact-us email: support@aftership.com termsOfService: https://www.aftership.com/legal/terms-of-service description: '> OAS Schema can be downloaded [here](https://stoplight.io/api/v1/projects/automizely/docs-api-automizely-com-commerce/nodes/reference/api.json?branch=testing%2F2026-07&deref=optimizedBundle)' servers: - url: https://api.aftership.com/commerce/2026-07 description: API Endpoint security: - as-api-key: [] tags: - name: Fulfillments paths: /fulfillments: parameters: [] post: summary: Create a fulfillment operationId: create-fulfillment responses: '201': description: '' content: application/json: schema: type: object properties: meta: $ref: '#/components/schemas/Meta.v1' x-stoplight: id: ujkfz8gihsdst data: $ref: '#/components/schemas/Fulfillment.v1' x-stoplight: id: qnklgttqrn1fg examples: Example 1: value: meta: code: 20000 type: OK message: The request was successfully processed by AfterShip. data: id: '423562565' order_id: '5187092316403' delivery_method: pickup status: processing line_items: - id: '13097711141107' product_id: '8021450916083' product_variant_id: '43768285298931' product_title: Power Mobile Phone product_variant_title: Power Mobile Phone (While) sku: SKU001 quantity: 1 unit_price: currency: USD amount: '10' unit_weight: unit: kg value: 10 image_urls: - https://example.com/product/image.png source_created_at: '2021-04-15T20:02:09Z' source_updated_at: '2021-04-16T20:02:09Z' created_at: '2021-04-15T20:02:09Z' updated_at: '2021-04-16T20:02:09Z' ship_from_location: location_id: 489b4bdec18d45d387752d63fb51ee1d address: type: business street_1: 1234 Elm Street street_2: Apt 5 street_3: '' city: New York state: NY postal_code: '10001' country_region: USA company: My Company first_name: John last_name: Doe email: john.doe@example.com phone: '+11234567890' pickup_location: location_id: e9ec84ff351e45e089a7b75ae497e1ae address: type: business street_1: 1234 Elm Street street_2: Apt 5 street_3: '' city: New York state: NY postal_code: '10001' country_region: USA company: My Company first_name: John last_name: Doe email: john.doe@example.com phone: '+11234567890' coordinate: latitude: 43 longitude: -75 opening_hours: sunday: open: true from: '10:30' to: '20:30' monday: open: true from: '10:30' to: '20:30' tuesday: open: true from: '10:30' to: '20:30' wednesday: open: true from: '10:30' to: '20:30' thursday: open: true from: '10:30' to: '20:30' friday: open: true from: '10:30' to: '20:30' saturday: open: true from: '10:30' to: '20:30' trackings: - tracking_number: RA123456789US slug: usps service_type: standard shipping ship_date: '2023-05-04' custom_fields: {} next_couriers: - tracking_number: RA123456789US slug: usps pickup_info: instructions: Shop open from Mon to Fri estimated_ready_for_pickup_at: min: '2021-04-15T20:02:09Z' max: '2021-04-15T20:02:09Z' pickup_deadline_at: '2021-04-15T20:02:09Z' requestBody: content: application/json: schema: type: object additionalProperties: false required: - order_id - delivery_method - status - line_items properties: id: type: string x-stoplight: id: 2mukldoy9aah7 description: A custom identifier for the fulfillment. If not provided, the system will generate a UUID. Must be unique within the store and immutable. You can use this ID to manage the resource in subsequent API calls. maxLength: 128 example: my-custom-id-123 pattern: ^[a-zA-Z0-9_-]+$ order_id: type: string description: The unique identifier of the order. This value must match the id of the order as returned by the GET /orders or GET /orders/{id} endpoints in the current API version. example: 960d25e570834e84b2a0fffd08fab7f9 delivery_method: type: string enum: - pickup - shipping x-stoplight: id: afqvk957zyot8 description: 'Delivery method of the order. For BOPIS related feature, please specify `pickup`. For more information about pickup order, please check the detailed [BOPIS introduction page](../docs/common_scenarios/tracking/bopis.md). ' example: shipping status: type: string description: "The status of the fulfillment. Depending of on the `delivery_method`, the allowed values are different.\n\nAllowed values: \n\ndelivery_method is shipping:\n`pending`, `processing`, `shipped`, `canceled`, and the custom defined statuses.\n\ndelivery_method is pickup:\n`pending`, `processing`, `ready_for_pickup`, `picked_up`, `canceled`, and the custom defined statuses." example: pending line_items: type: array description: The items which included in this fulifllment. items: type: object required: - id - quantity properties: id: type: string x-stoplight: id: b8ylued052ce5 description: 'A unique identifier for the line item in your system. The value should be exist in one of the items in the corresponding order. Note that it should be the same as the `order.items.*.id` of the `Order` resource. ' example: '365756526' quantity: type: integer description: The number of items in this fulfillment. example: 1 source_created_at: type: string format: date-time description: The date and time, formatted in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), indicating when the fulfillment was created in your e-commerce system. example: '2021-04-15T20:02:09Z' source_updated_at: type: string format: date-time description: The date and time, formatted in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), indicating when the fulfillment was updated in your e-commerce system. example: '2021-04-15T20:02:09Z' ship_from_location: type: object description: The location information where the fulfillment shipped from. It is recommended to include this field if the fulfillment's delivery method is `shipping`. Note that you must provide either `location_id` or `address`, but not both. additionalProperties: false properties: location_id: type: string description: The unique identifier for the location, as provided by AfterShip. You can manage and configure these locations [here](https://organization.automizely.com/warehouses). example: 489b4bdec18d45d387752d63fb51ee1d address: $ref: '#/components/schemas/Address.v1' description: The address object of this location. pickup_location: type: object description: The location information where the fulfillment is designated to be pickup from. Mandatory when the delivery method of the fulfillment is `pickup`. required: - location_id properties: location_id: type: string x-stoplight: id: oeu555x37j99n description: The ID of the Location pre-created in AfterShip admin example: a52eeb761d204f3cbae06fa93b452976 trackings: type: array description: 'Represents shipment tracking information. This object supports two mutually exclusive usage patterns: Reference Mode: Pass the id of a resource pre-created via the Tracking API. This enables full tracking capabilities. Inline Mode: Pass the tracking_number (and optional slug) directly. This is strictly for record-keeping purposes and does not create an active tracking task or support status updates.' items: $ref: '#/components/schemas/Tracking.v1' pickup_info: $ref: '#/components/schemas/Pickup.v1' x-stoplight: id: 5aa9r2fwkttmx description: The pickup information of the fulfillment. It is recommended to include this field if the fulfillment's delivery method is `pickup`. examples: Example 1: value: id: '25462567654' delivery_method: pickup status: pending line_items: - id: '365756526' quantity: 1 source_created_at: '2021-04-15T20:02:09Z' source_updated_at: '2021-04-15T20:02:09Z' ship_from_location: location_id: a2a00a8bfefb423a98f456c95dfbfde5 pickup_location: location_id: a52eeb761d204f3cbae06fa93b452976 trackings: - id: tracking1 - id: tracking2 pickup_info: instructions: Shop open from Mon to Fri estimated_ready_for_pickup_at: min: '2021-04-15T20:02:09Z' max: '2021-04-15T20:02:09Z' pickup_deadline_at: '2021-04-15T20:02:09Z' parameters: - $ref: '#/components/parameters/as-store-id' tags: - Fulfillments description: 'Create a fulfillment.
[url](../docs/common_scenarios/tracking/bopis.md)
' get: summary: Get fulfillments operationId: get-fulfillments responses: '200': description: '' content: application/json: schema: type: object properties: meta: $ref: '#/components/schemas/Meta.v1' x-stoplight: id: 2oof1vzbg6pbc data: type: object x-stoplight: id: afcxh5cs1luoe properties: fulfillments: type: array x-stoplight: id: gnkg1y38ly9wx items: $ref: '#/components/schemas/Fulfillment.v1' x-stoplight: id: 61k82pdpp1a41 pagination: $ref: '#/components/schemas/Pagination.v2' x-stoplight: id: nw7cd7995yweq examples: Example 1: value: meta: code: 20000 type: OK message: The request was successfully processed by AfterShip. data: fulfillments: - id: '423562565' order_id: '5187092316403' delivery_method: pickup status: processing line_items: - id: '13097711141107' product_id: '8021450916083' product_variant_id: '43768285298931' product_title: Power Mobile Phone product_variant_title: Power Mobile Phone (While) sku: SKU001 quantity: 1 unit_price: currency: USD amount: '10' unit_weight: unit: kg value: 10 image_urls: - https://example.com/product/image.png source_created_at: '2021-04-15T20:02:09Z' source_updated_at: '2021-04-16T20:02:09Z' created_at: '2021-04-15T20:02:09Z' updated_at: '2021-04-16T20:02:09Z' ship_from_location: location_id: 489b4bdec18d45d387752d63fb51ee1d address: type: business street_1: 1234 Elm Street street_2: Apt 5 street_3: '' city: New York state: NY postal_code: '10001' country_region: USA company: My Company first_name: John last_name: Doe email: john.doe@example.com phone: '+11234567890' pickup_location: location_id: e9ec84ff351e45e089a7b75ae497e1ae address: type: business street_1: 1234 Elm Street street_2: Apt 5 street_3: '' city: New York state: NY postal_code: '10001' country_region: USA company: My Company first_name: John last_name: Doe email: john.doe@example.com phone: '+11234567890' coordinate: latitude: 43 longitude: -75 opening_hours: sunday: open: true from: '10:30' to: '20:30' monday: open: true from: '10:30' to: '20:30' tuesday: open: true from: '10:30' to: '20:30' wednesday: open: true from: '10:30' to: '20:30' thursday: open: true from: '10:30' to: '20:30' friday: open: true from: '10:30' to: '20:30' saturday: open: true from: '10:30' to: '20:30' trackings: - tracking_number: RA123456789US slug: usps service_type: standard shipping ship_date: '2023-05-04' custom_fields: {} next_couriers: - tracking_number: RA123456789US slug: usps pickup_info: instructions: Shop open from Mon to Fri estimated_ready_for_pickup_at: min: '2021-04-15T20:02:09Z' max: '2021-04-15T20:02:09Z' pickup_deadline_at: '2021-04-15T20:02:09Z' pagination: page: 0 limit: 0 has_next_page: true description: 'Get fulfillment results with multiple fulfillments. > In the query parameters, you must include only one of the following: `order_id` or `ids[]`. All other parameters should be omitted.

Only a single filter parameter can be included in each request. ' parameters: - schema: type: string in: query name: order_id description: Order ID - schema: type: string minLength: 1 maxLength: 20 in: query name: ids[] description: Fulfillment IDs. Max length is 20 - schema: type: integer default: 10 minimum: 1 maximum: 50 in: query name: limit - schema: type: integer default: 1 minimum: 1 maximum: 200 in: query name: page - $ref: '#/components/parameters/as-store-id' tags: - Fulfillments /fulfillments/{id}: parameters: - schema: type: string name: id in: path required: true description: The ID of the fulfillment. get: summary: Get fulfillment by ID operationId: get-fulfillment-by-id responses: '200': description: '' content: application/json: schema: type: object properties: meta: $ref: '#/components/schemas/Meta.v1' x-stoplight: id: tyd6pnlqdafgi data: $ref: '#/components/schemas/Fulfillment.v1' x-stoplight: id: k1rdsmaa4a69n examples: Example 1: value: meta: code: 20000 type: OK message: The request was successfully processed by AfterShip. data: id: '423562565' order_id: '5187092316403' delivery_method: pickup status: processing line_items: - id: '13097711141107' product_id: '8021450916083' product_variant_id: '43768285298931' product_title: Power Mobile Phone product_variant_title: Power Mobile Phone (While) sku: SKU001 quantity: 1 unit_price: currency: USD amount: '10' unit_weight: unit: kg value: 10 image_urls: - https://example.com/product/image.png source_created_at: '2021-04-15T20:02:09Z' source_updated_at: '2021-04-16T20:02:09Z' created_at: '2021-04-15T20:02:09Z' updated_at: '2021-04-16T20:02:09Z' ship_from_location: location_id: 489b4bdec18d45d387752d63fb51ee1d address: type: business street_1: 1234 Elm Street street_2: Apt 5 street_3: '' city: New York state: NY postal_code: '10001' country_region: USA company: My Company first_name: John last_name: Doe email: john.doe@example.com phone: '+11234567890' pickup_location: location_id: e9ec84ff351e45e089a7b75ae497e1ae address: type: business street_1: 1234 Elm Street street_2: Apt 5 street_3: '' city: New York state: NY postal_code: '10001' country_region: USA company: My Company first_name: John last_name: Doe email: john.doe@example.com phone: '+11234567890' coordinate: latitude: 43 longitude: -75 opening_hours: sunday: open: true from: '10:30' to: '20:30' monday: open: true from: '10:30' to: '20:30' tuesday: open: true from: '10:30' to: '20:30' wednesday: open: true from: '10:30' to: '20:30' thursday: open: true from: '10:30' to: '20:30' friday: open: true from: '10:30' to: '20:30' saturday: open: true from: '10:30' to: '20:30' trackings: - tracking_number: RA123456789US slug: usps service_type: standard shipping ship_date: '2023-05-04' custom_fields: {} next_couriers: - tracking_number: RA123456789US slug: usps pickup_info: instructions: Shop open from Mon to Fri estimated_ready_for_pickup_at: min: '2021-04-15T20:02:09Z' max: '2021-04-15T20:02:09Z' pickup_deadline_at: '2021-04-15T20:02:09Z' parameters: - $ref: '#/components/parameters/as-store-id' tags: - Fulfillments description: Get a fulfillment by ID. patch: summary: Update fulfillment by ID operationId: update-fulfillment-by-id responses: '200': description: '' content: application/json: schema: type: object properties: meta: $ref: '#/components/schemas/Meta.v1' x-stoplight: id: 4qrgu8l1wtgk0 data: $ref: '#/components/schemas/Fulfillment.v1' x-stoplight: id: xkfjdnmq8lb1g examples: Example 1: value: meta: code: 20000 type: OK message: The request was successfully processed by AfterShip. data: id: '423562565' order_id: '5187092316403' delivery_method: pickup status: processing line_items: - id: '13097711141107' product_id: '8021450916083' product_variant_id: '43768285298931' product_title: Power Mobile Phone product_variant_title: Power Mobile Phone (While) sku: SKU001 quantity: 1 unit_price: currency: USD amount: '10' unit_weight: unit: kg value: 10 image_urls: - https://example.com/product/image.png source_created_at: '2021-04-15T20:02:09Z' source_updated_at: '2021-04-16T20:02:09Z' created_at: '2021-04-15T20:02:09Z' updated_at: '2021-04-16T20:02:09Z' ship_from_location: location_id: 489b4bdec18d45d387752d63fb51ee1d address: type: business street_1: 1234 Elm Street street_2: Apt 5 street_3: '' city: New York state: NY postal_code: '10001' country_region: USA company: My Company first_name: John last_name: Doe email: john.doe@example.com phone: '+11234567890' pickup_location: location_id: e9ec84ff351e45e089a7b75ae497e1ae address: type: business street_1: 1234 Elm Street street_2: Apt 5 street_3: '' city: New York state: NY postal_code: '10001' country_region: USA company: My Company first_name: John last_name: Doe email: john.doe@example.com phone: '+11234567890' coordinate: latitude: 43 longitude: -75 opening_hours: sunday: open: true from: '10:30' to: '20:30' monday: open: true from: '10:30' to: '20:30' tuesday: open: true from: '10:30' to: '20:30' wednesday: open: true from: '10:30' to: '20:30' thursday: open: true from: '10:30' to: '20:30' friday: open: true from: '10:30' to: '20:30' saturday: open: true from: '10:30' to: '20:30' trackings: - tracking_number: RA123456789US slug: usps service_type: standard shipping ship_date: '2023-05-04' custom_fields: {} next_couriers: - tracking_number: RA123456789US slug: usps pickup_info: instructions: Shop open from Mon to Fri estimated_ready_for_pickup_at: min: '2021-04-15T20:02:09Z' max: '2021-04-15T20:02:09Z' pickup_deadline_at: '2021-04-15T20:02:09Z' requestBody: content: application/json: schema: type: object additionalProperties: false properties: source_updated_at: type: string x-stoplight: id: e2qmaz5g0y1f9 example: '2021-04-15T20:02:09Z' description: The date and time, formatted in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), indicating when the fulfillment was updated in your e-commerce system. pickup_info: $ref: '#/components/schemas/Pickup.v1' x-stoplight: id: 62dp4m5z4n5ox description: The pickup information of the fulfillment. It is recommended to include this field if the fulfillment's delivery method is `pickup`. trackings: type: array x-stoplight: id: jlthskrdds0zx description: 'The shipment information of the fulfillment. **Note**: This endpoint directly replaces any existing trackings with the provided data. To avoid updating trackings, simply omit this key-value pair from your request. Note that providing an empty array will result in the deletion of all current trackings.' items: $ref: '#/components/schemas/Tracking.v1' x-stoplight: id: cjkv26yzl5jcb ship_from_location: type: object x-stoplight: id: t5xw5npcu6vxj description: The location information where the fulfillment shipped from. It is recommended to include this field if the fulfillment's delivery method is `shipping`. additionalProperties: false properties: location_id: type: string description: The unique identifier for the location, as provided by AfterShip. You can manage and configure these locations [here](https://organization.automizely.com/warehouses). example: 489b4bdec18d45d387752d63fb51ee1d address: $ref: '#/components/schemas/Address.v1' description: The address object of this location. pickup_location: $ref: '#/components/schemas/Pickup_location.v1' x-stoplight: id: ou78lfdhqjx26 description: The location information where the fulfillment is designated to be pickup from. Mandatory when the delivery method of the fulfillment is `pickup`. examples: Example 1: value: source_updated_at: '2021-04-15T20:02:09Z' pickup_info: instructions: Shop open from Mon to Fri estimated_ready_for_pickup_at: min: '2021-04-15T20:02:09Z' max: '2021-04-15T20:02:09Z' pickup_deadline_at: '2021-04-15T20:02:09Z' trackings: - tracking_number: RA123456789US slug: usps service_type: standard shipping ship_date: '2023-05-04' custom_fields: {} next_couriers: - tracking_number: RA123456789US slug: usps ship_from_location: location_id: 489b4bdec18d45d387752d63fb51ee1d address: type: business street_1: 1234 Elm Street street_2: Apt 5 street_3: '' city: New York state: NY postal_code: '10001' country_region: USA company: My Company first_name: John last_name: Doe email: john.doe@example.com phone: '+11234567890' pickup_location: location_id: e9ec84ff351e45e089a7b75ae497e1ae address: type: business street_1: 1234 Elm Street street_2: Apt 5 street_3: '' city: New York state: NY postal_code: '10001' country_region: USA company: My Company first_name: John last_name: Doe email: john.doe@example.com phone: '+11234567890' coordinate: latitude: 43 longitude: -75 opening_hours: sunday: open: true from: '10:30' to: '20:30' monday: open: true from: '10:30' to: '20:30' tuesday: open: true from: '10:30' to: '20:30' wednesday: open: true from: '10:30' to: '20:30' thursday: open: true from: '10:30' to: '20:30' friday: open: true from: '10:30' to: '20:30' saturday: open: true from: '10:30' to: '20:30' description: Update a fulfillment by ID. parameters: - $ref: '#/components/parameters/as-store-id' tags: - Fulfillments /fulfillments/{id}/update-status: parameters: - schema: type: string name: id in: path required: true description: The ID of the fulfillment. post: summary: Update fulfillment status operationId: update-fulfillment-status responses: '200': description: '' content: application/json: schema: type: object properties: meta: $ref: '#/components/schemas/Meta.v1' x-stoplight: id: jymi39zdlju1g data: $ref: '#/components/schemas/Fulfillment.v1' x-stoplight: id: b4h6snhjfycm1 examples: Example 1: value: meta: code: 20000 type: OK message: The request was successfully processed by AfterShip. data: id: '423562565' order_id: '5187092316403' delivery_method: pickup status: processing line_items: - id: '13097711141107' product_id: '8021450916083' product_variant_id: '43768285298931' product_title: Power Mobile Phone product_variant_title: Power Mobile Phone (While) sku: SKU001 quantity: 1 unit_price: currency: USD amount: '10' unit_weight: unit: kg value: 10 image_urls: - https://example.com/product/image.png source_created_at: '2021-04-15T20:02:09Z' source_updated_at: '2021-04-16T20:02:09Z' created_at: '2021-04-15T20:02:09Z' updated_at: '2021-04-16T20:02:09Z' ship_from_location: location_id: 489b4bdec18d45d387752d63fb51ee1d address: type: business street_1: 1234 Elm Street street_2: Apt 5 street_3: '' city: New York state: NY postal_code: '10001' country_region: USA company: My Company first_name: John last_name: Doe email: john.doe@example.com phone: '+11234567890' pickup_location: location_id: e9ec84ff351e45e089a7b75ae497e1ae address: type: business street_1: 1234 Elm Street street_2: Apt 5 street_3: '' city: New York state: NY postal_code: '10001' country_region: USA company: My Company first_name: John last_name: Doe email: john.doe@example.com phone: '+11234567890' coordinate: latitude: 43 longitude: -75 opening_hours: sunday: open: true from: '10:30' to: '20:30' monday: open: true from: '10:30' to: '20:30' tuesday: open: true from: '10:30' to: '20:30' wednesday: open: true from: '10:30' to: '20:30' thursday: open: true from: '10:30' to: '20:30' friday: open: true from: '10:30' to: '20:30' saturday: open: true from: '10:30' to: '20:30' trackings: - tracking_number: RA123456789US slug: usps service_type: standard shipping ship_date: '2023-05-04' custom_fields: {} next_couriers: - tracking_number: RA123456789US slug: usps pickup_info: instructions: Shop open from Mon to Fri estimated_ready_for_pickup_at: min: '2021-04-15T20:02:09Z' max: '2021-04-15T20:02:09Z' pickup_deadline_at: '2021-04-15T20:02:09Z' description: 'Updating the fulfillment status by fulfillment ID. ## Status Updating Sequence The fulfillment status must be updated in a specific sequence according to the fullfilment delivery method (`fulfillment.delivery_method`). For `shipping` fulfillment, the statuses should be updated in the following order: > `pending` → `processing` → `shipped` → `canceled` **Note:** Updating the status in reverse, such as updating from `shipped` to `processing`, **is not permitted**. Similarly, for `pickup` fulfillment, the statuses should be updated in the following order: > `pending` → `processing` → `ready_for_pickup` → `picked_up` → `canceled` ## Custom Status The provided status sequences do not include any custom statuses. For custom statuses, please adhere to the sequence configured in the AfterShip Admin Portal. Ensure that statuses are updated in the prescribed order to avoid any discrepancies.' requestBody: content: application/json: schema: type: object x-examples: Example 1: status: custom-status required: - status - occurred_at properties: status: type: string x-stoplight: id: caaaa22j8prpm description: "The status of the fulfillment. Depending of on the `delivery_method`, the allowed values are different.\n\nAllowed values: \n\ndelivery_method is shipping:\n`pending`, `processing`, `shipped`, `canceled`, and the custom defined statuses.\n\ndelivery_method is pickup:\n`pending`, `processing`, `ready_for_pickup`, `picked_up`, `canceled`, and the custom defined statuses." example: pending occurred_at: type: string x-stoplight: id: mgkf5gceepa4k format: date-time description: Indicates the time the status was updated, showing when the Doege occurred for the fulfillment, formatted in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601). example: '2021-04-15T20:02:09Z' examples: Example 1: value: status: pending occurred_at: '2021-04-15T20:02:09Z' description: '' x-internal: false parameters: - $ref: '#/components/parameters/as-store-id' tags: - Fulfillments components: schemas: Money.v1: description: The unit price of the item. title: Money x-stoplight: id: b2024e5c6f23f examples: - currency: USD amount: '10' type: object x-tags: - Primitive additionalProperties: false properties: currency: type: string enum: - AED - AFN - ALL - AMD - ANG - AOA - ARS - AUD - AWG - AZN - BAM - BBD - BDT - BGN - BHD - BIF - BMD - BND - BOB - BOV - BRL - BSD - BTN - BWP - BYN - BZD - CAD - CDF - CHE - CHF - CHW - CLF - CLP - CNY - COP - COU - CRC - CUC - CUP - CVE - CZK - DJF - DKK - DOP - DZD - EGP - ERN - ETB - EUR - FJD - FKP - GBP - GEL - GHS - GIP - GMD - GNF - GTQ - GYD - HKD - HNL - HRK - HTG - HUF - IDR - ILS - INR - IQD - IRR - ISK - JMD - JOD - JPY - KES - KGS - KHR - KMF - KPW - KRW - KWD - KYD - KZT - LAK - LBP - LKR - LRD - LSL - LYD - MAD - MDL - MGA - MKD - MMK - MNT - MOP - MRU - MUR - MVR - MWK - MXN - MXV - MYR - MZN - NAD - NGN - NIO - NOK - NPR - NZD - OMR - PAB - PEN - PGK - PHP - PKR - PLN - PYG - QAR - RON - RSD - RUB - RWF - SAR - SBD - SCR - SDG - SEK - SGD - SHP - SLL - SOS - SRD - SSP - STN - SVC - SYP - SZL - THB - TJS - TMT - TND - TOP - TRY - TTD - TWD - TZS - UAH - UGX - USD - USN - UYI - UYU - UYW - UZS - VES - VND - VUV - WST - XAF - XAU - XBA - XBB - XBC - XBD - XCD - XDR - XOF - XPD - XPF - XPT - XSU - XTS - XUA - XXX - YER - ZAR - ZMW - ZWL description: Currency code for the amount, adhering to the ISO 4217 standard. example: USD amount: type: string description: The amount value in string format. example: '10' Pickup_location.v1: x-stoplight: id: ou78lfdhqjx26 description: The location information where the fulfillment is designated to be pickup from. Mandatory when the delivery method of the fulfillment is `pickup`. title: PickupLocation type: object x-tags: - Primitive properties: location_id: type: string x-stoplight: id: o6v7ot5p5owq0 description: The unique identifier for the address. You can find or create the corresponding value [here](https://organization.automizely.com/warehouses). example: e9ec84ff351e45e089a7b75ae497e1ae address: $ref: '#/components/schemas/Address_with_coordinate.v1' x-stoplight: id: xd0n6n4djzcml description: Address of the pickup location. opening_hours: $ref: '#/components/schemas/Opening_hours.v1' x-stoplight: id: xwxu19pd0nc0h description: Opening hours information of the pickup location. Pickup.v1: x-stoplight: id: xuy8sphna6ej7 description: 'To indicate the detailed pickup instruction of the order when the delivery method of the order is `pickup`. For further details on pickup / BOPIS orders, refer to our comprehensive [BOPIS introduction page](../docs/common_scenarios/tracking/bopis.md).' title: Pickup type: object x-tags: - Primitive properties: instructions: type: string description: 'Instructions for the pickup process. The value specified in this field will take precedence if provided through the API. If not specified, it will default to the pickup location''s instructions set in the AfterShip Admin Portal.' example: Shop open from Mon to Fri estimated_ready_for_pickup_at: type: object description: 'The expected date and time when the items in this fulfillment order will be ready for pickup. This information will be displayed on the Brand Tracking Page and included in customer notifications.' x-stoplight: id: la1jawtei2np5 properties: min: type: string format: date-time description: The earliest anticipated date and time, formatted in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601). example: '2021-04-15T20:02:09Z' max: type: string format: date-time description: The latest anticipated date and time, formatted in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601). example: '2021-04-15T20:02:09Z' pickup_deadline_at: type: string x-stoplight: id: lvr0jt3nk49b5 format: date-time description: 'The latest time by which the pickup must be completed, formatted in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601). This information will be displayed on the Brand Tracking Page. ' example: '2021-04-15T20:02:09Z' Opening_hours.v1: description: The regular opening hours of the location. title: OpeningHours x-stoplight: id: n7s4wz0dwk5ai type: object properties: sunday: $ref: '#/components/schemas/Opening_hour_period.v1' monday: $ref: '#/components/schemas/Opening_hour_period.v1' tuesday: $ref: '#/components/schemas/Opening_hour_period.v1' wednesday: $ref: '#/components/schemas/Opening_hour_period.v1' thursday: $ref: '#/components/schemas/Opening_hour_period.v1' friday: $ref: '#/components/schemas/Opening_hour_period.v1' saturday: $ref: '#/components/schemas/Opening_hour_period.v1' x-tags: - Primitive Opening_hour_period.v1: title: OpeningHourPeriod x-stoplight: id: 2g4w1syylsphw type: object additionalProperties: false description: The `OpeningHourPeriod` model provides detailed information about a location's operating hours for a specific day. It includes the start and end times, and indicates whether the location is open on that particular day. x-tags: - Primitive properties: open: type: boolean default: false x-stoplight: id: qbb3rmmdfdhxy description: Indicate whether the store is open on this day. For locations that operate 24 hours, please set the value to `true`. from: type: - string - 'null' x-stoplight: id: fvyfkui68t3gt description: The start time of the opening hour period in YY:MM format. For locations that operate 24 hours, please set the value to `null`. example: '10:30' to: type: - string - 'null' x-stoplight: id: sk5yjthy1achl description: The end time of the opening hour period in YY:MM format. For locations that operate 24 hours, please set the value to `null`. example: '20:30' examples: - open: true from: '10:30' to: '20:30' Address.v1: description: Billing address of the order. type: object x-stoplight: id: 7cc87e0eb2a0d title: Address examples: - type: business street_1: 1234 Elm Street street_2: Apt 5 street_3: null city: New York state: NY postal_code: '10001' country_region: USA company: My Company first_name: John last_name: Doe email: john.doe@example.com phone: '+13525554500' x-tags: - Primitive additionalProperties: false required: - street_1 - state - country_region properties: type: type: string title: The Type Schema description: The type of address. enum: - business - residential street_1: type: string title: The Street_1 Schema description: First line of the street address. maxLength: 256 street_2: type: - string - 'null' title: The Street_2 Schema description: Second line of the street address. maxLength: 256 street_3: type: - string - 'null' title: The Street_3 Schema description: Third line of the street address. maxLength: 256 city: type: string title: The City Schema description: The location's city, town, or village. maxLength: 256 state: type: string title: The State Schema description: The state or region of the location, such as a province, state, or prefecture. maxLength: 256 postal_code: type: string title: The Postal_code Schema description: The postal code of the location (also known as zip code, postcode, Eircode, etc.). maxLength: 256 country_region: type: string title: The Country Schema description: The address country/region in [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) format. API will automatically convert input to uppercase. example: USA pattern: ^[A-Z]{3}$ company: type: string title: The Company Schema description: The name of the company associated to the address. maxLength: 256 first_name: type: string title: The First_name Schema description: The first name of the person associated to the address. maxLength: 256 last_name: type: string title: The Last_name Schema description: The last name of the person associated to the address. maxLength: 256 email: type: string title: The Email Schema description: The email address of the person associated to the address. maxLength: 256 phone: type: string description: The phone number of the person associated to the address. maxLength: 256 Tracking.v1: title: Tracking x-stoplight: id: wugw7lvo5asco description: 'Represents shipment tracking information. This object supports two mutually exclusive usage patterns: Reference Mode: Pass the tracking ID which created via the Tracking API. This enables full tracking capabilities. Inline Mode: Pass the tracking_number (and optional slug) directly. This is strictly for record-keeping purposes and does not create an active tracking task, and hence AfterShip system would not provide status updates to this tracking number.' x-tags: - Primitive oneOf: - title: Reference Mode required: - id properties: id: type: string x-stoplight: id: x8fzwnwtejyio description: The unique identifier of a tracking resource previously created via the Tracking API. - title: Inline Mode x-stoplight: id: oqruujqsvdt22 required: - tracking_number properties: tracking_number: type: string x-stoplight: id: a8z8ptxolucqz slug: type: string x-stoplight: id: g2wj5ar3j83w6 description: Unique courier code. For a complete list of available courier codes, click here. type: object Meta.v1: description: 'The `Meta` model holds the metadata of the API response, including relevant error details for debugging purposes.
[url](../../docs/quickstart/request_errors.md)
' type: object x-examples: {} title: Meta x-tags: - Envelope examples: - code: 20000 type: OK message: The request was successfully processed by AfterShip. additionalProperties: false required: - code - type - message properties: code: type: number default: 20000 example: 20000 description: Error code in integer format. For detailed information, please refer to the [Request Error](../../docs/quickstart/request_errors.md) introduction page. type: type: string minLength: 1 example: OK description: Response type string for the reference. For detailed information, please refer to the [Request Error](../../docs/quickstart/request_errors.md) introduction page. message: type: string minLength: 1 example: The request was successfully processed by AfterShip. description: Human-readable response message. For detailed information, please refer to the [Request Error](../../docs/quickstart/request_errors.md) introduction page. errors: type: array description: 'Error detail object. Each error object contains a "path" key and an "info" key. The "path" is the JSON path of the request object to indicate the error location. The "info" is a human-readable description of the error. ' items: $ref: '#/components/schemas/Error.v1' Fulfillment.v1: x-stoplight: id: qnklgttqrn1fg title: Fulfillment type: object x-tags: - Resource description: 'The `Fulfillment` model encapsulates the details of processing and delivering orders in an eCommerce context. It includes information such as fulfillment status, shipment tracking, the items to be fulfilled, and so on.
[url](../../docs/common_scenarios/tracking/bopis.md)
' additionalProperties: false required: - id - order_id - delivery_method - status - line_items - created_at - updated_at properties: id: type: string x-stoplight: id: 3z259q39en5fr description: The unique identifier of the fulfillment. If a custom ID was provided in the request, that value is used; otherwise, a system-generated UUID is assigned. You can use this ID to manage this resource in related API calls. example: '423562565' order_id: type: string x-stoplight: id: 9zw2pi119wjnl description: It should be the same as the `order.id` of the `Order` resource. example: '5187092316403' delivery_method: type: string enum: - pickup - shipping x-stoplight: id: t9hsy1t30zkh8 description: 'Delivery method of the order. For BOPIS related feature, please specify `pickup`. For more information about pickup order, please check the detailed [BOPIS introduction page](../../docs/common_scenarios/tracking/bopis.md). ' example: shipping status: type: string description: "The status of the fulfillment. Depending of on the `delivery_method`, the allowed values are different.\n\nAllowed values: \n\ndelivery_method is shipping:\n`pending`, `processing`, `shipped`, `canceled`, and the custom defined statuses.\n\ndelivery_method is pickup:\n`pending`, `processing`, `ready_for_pickup`, `picked_up`, `canceled`, and the custom defined statuses." example: processing line_items: type: array description: The items which included in this fulifllment. items: type: object required: - id - product_id - product_variant_id - sku - quantity properties: id: type: string x-stoplight: id: vh27skvspcy3e description: 'A unique identifier for the line item in your system. The value should be exist in one of the items in the corresponding order. Note that it should be the same as the `order.items.*.id` of the `Order` resource. ' example: '13097711141107' product_id: type: string x-stoplight: id: 62p41vjigs5st description: 'The ID of the product in your system. Note that it should be the same as the `product.id` of the `Product` resource. ' example: '8021450916083' product_variant_id: type: string description: 'The ID of the product variant in source system. Note that it should be the same as the `product.variants.id` of the `Product` resource.' example: '43768285298931' product_title: type: string description: 'The title of the product. ' example: Power Mobile Phone product_variant_title: type: string description: 'The title of the product variant. ' example: Power Mobile Phone (While) sku: type: string description: 'The item''s SKU (stock keeping unit). ' example: SKU001 quantity: type: integer description: The number of items in this fulfillment. example: 1 unit_price: $ref: '#/components/schemas/Money.v1' description: The price of the item before discounts and taxes have been applied. unit_weight: $ref: '#/components/schemas/Weight.v1' description: The item's weight. image_urls: type: array description: Image urls of this product variant. items: type: string example: https://example.com/product/image.png source_created_at: type: string format: date-time description: The date and time, formatted in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), indicating when the fulfillment was created in your e-commerce system. example: '2021-04-15T20:02:09Z' source_updated_at: type: string format: date-time description: The date and time, formatted in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601), indicating when the fulfillment was updated in your e-commerce system. example: '2021-04-16T20:02:09Z' created_at: type: string format: date-time description: The date and time (ISO 8601 format) when the fulfillment was created in AfterShip. example: '2021-04-15T20:02:09Z' updated_at: type: string format: date-time description: The date and time (ISO 8601 format) when the fulfillment was updated in AfterShip. example: '2021-04-16T20:02:09Z' ship_from_location: type: object description: The location information where the fulfillment shipped from. additionalProperties: false properties: location_id: type: string description: The unique identifier for the location, as provided by AfterShip. You can manage and configure these locations [here](https://organization.automizely.com/warehouses). example: 489b4bdec18d45d387752d63fb51ee1d address: $ref: '#/components/schemas/Address.v1' description: The address object of this location. pickup_location: $ref: '#/components/schemas/Pickup_location.v1' description: The location information where the fulfillment is designated to be pickup from. trackings: type: array description: The shipment information of the fulfillment. items: $ref: '#/components/schemas/Tracking.v1' pickup_info: $ref: '#/components/schemas/Pickup.v1' description: The pickup information of the fulfillment. x-stoplight: id: pl9ahbkgvzsfd Error.v1: type: object title: Error description: The `Error` model contains a "path" key and an "info" key. The "path" is the JSON path of the request object to indicate the error location. The "info" is a human-readable description of the error. examples: - path: data.policy_id info: data.policy_id must not be 32 characters additionalProperties: false x-tags: - Envelope properties: path: type: string description: The JSON path of the request object to indicate the error location. example: data.product.title info: type: string description: A human-readable description of the error. example: Title is invalid Pagination.v2: title: Pagination x-stoplight: id: 6twr4wc3wp9lu type: object examples: - page: 1 limit: 10 has_next_page: false description: The `Pagination` holds the information for the pagination when the response contains multiple objects. x-tags: - Envelope properties: page: type: integer x-stoplight: id: 5ld3b35057z8s description: Page number. limit: type: integer x-stoplight: id: qmvbmlfjchyh5 description: Maximum object count per page. has_next_page: type: boolean x-stoplight: id: qtm2ifhlv0r4i description: To indicate if next page is available. Weight.v1: description: The unit weight of the item. title: Weight x-stoplight: id: 6ffc0efbd7bf5 type: object examples: - unit: kg value: 10 x-tags: - Primitive properties: unit: type: string enum: - kg - lb - oz - g description: 'The weight unit eg: g or kg.' value: type: number description: The value of the weight. example: 10 Address_with_coordinate.v1: description: The physical address and contact information of the location. For Location resources, `first_name` and `last_name` are joined into one contact name on write; on read, the full contact name is returned as `first_name` and `last_name` is empty. The `type` field is accepted by the schema but not used for Location resources — omit it on write; on read it is always empty. type: object x-stoplight: id: nu2sh0erm8041 title: AddressWithCoordinate examples: - type: business street_1: 1234 Elm Street street_2: Apt 5 street_3: null city: New York state: NY postal_code: '10001' country_region: USA company: My Company first_name: John last_name: Doe email: john.doe@example.com phone: '+13525554500' coordinate: latitude: 43 longitude: -75 x-tags: - Primitive additionalProperties: false required: - street_1 - state - country_region properties: type: type: string title: The Type Schema description: The type of address. enum: - business - residential street_1: type: string title: The Street_1 Schema description: First line of the street address. maxLength: 256 street_2: type: - string - 'null' title: The Street_2 Schema description: Second line of the street address. maxLength: 256 street_3: type: - string - 'null' title: The Street_3 Schema description: Third line of the street address. maxLength: 256 city: type: string title: The City Schema description: The location's city, town, or village. maxLength: 256 state: type: string title: The State Schema description: The state or region of the location, such as a province, state, or prefecture. maxLength: 256 postal_code: type: string title: The Postal_code Schema description: The postal code of the location (also known as zip code, postcode, Eircode, etc.). maxLength: 256 country_region: type: string title: The Country Schema description: The address country/region in [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) format. example: USA pattern: ^[A-Z]{3}$ company: type: string title: The Company Schema description: The name of the company associated to the address. maxLength: 256 first_name: type: string title: The First_name Schema description: The first name of the person associated to the address. maxLength: 256 last_name: type: string title: The Last_name Schema description: The last name of the person associated to the address. maxLength: 256 email: type: string title: The Email Schema description: The email address of the person associated to the address. maxLength: 256 phone: type: string description: The phone number of the person associated to the address. maxLength: 256 coordinate: type: object description: The coordinate of the address. properties: longitude: type: number description: The longitude of the address. latitude: type: number description: The latitude of the address. parameters: as-store-id: name: as-store-id in: header required: true schema: type: string description: This value equals to `store.id` of `Store` Resource. You can obtain this id by making a GET /stores call to get existing stores or a POST /stores to create a new store. securitySchemes: as-api-key: name: as-api-key type: apiKey in: header x-stoplight: id: 07dbd324ec273