Product

Endpoints relating to Product objects

List all products for a client

Returns a list of all products belonging to this client

Request
query Parameters
f.sku
string

Find the products having this SKU. SKUs are unique among active products, but there may be archived products that share the same sku.

f.archived_at.exists
boolean

Filter out all archived products (f.archived_at.exists=false) or filter out all unarchived products (f.archived_at.exists=true)

f.product_properties.TYPE
string

Search for product properties that are key-value pairs. The key (TYPE) is appended at the end of the parameter name. Multiple property filters can be added to the same query. E.G. f.product_properties.color=blue

Responses
200

Success

Response Schema: application/json
_object
string
self
string
version
integer
object
_object
string
prev
string or null
next
string or null
Array of objects (Product)
400

error

get/products
Response samples
application/json
{
  • "_object": "/api/response",
  • "version": 2,
  • "data": {
    • "_object": "/api/collectoins/paginated",
    • "data": [
      • {
        }
      ]
    }
}

Create a product

Create a new product for this client using the request payload

Request
Request Body schema: application/json
required
name
required
string

Always required. Name of product

sku
required
string

Always required. SKU of product

description
string

Description of product

product_category
string

The category of the product

country_of_origin
string

Nation in which the product is manufactured

client_verified
boolean
Default: false

Indicates whether Client has verified this Product.

Array of objects (WriteProductProperty)

Array of product properties, custom key value pairs that describe the product

Array
type
required
string

Always required. User defined type of this property

value
required
string

Always required. Value of this property

Array of objects (WriteProductClassification)

Array of product classifications. If a value is specified, the array of product classifications will replace the existing set of product classifications.

Array
codes
required
Array of strings

Always required. An array of HS codes for this product in the provided region

region
required
string

Always required. The region for this classification. Currently only 2-character ISO codes and "EU" are supported

Array of objects (Fee)

An array of fees associated with this classification

Array of objects (WriteProductSupplier)

Array of suppliers. If a value is specified, the array of suppliers will replace the existing set of suppliers.

Array
id
integer

The supplier location ID. Either id or ref is required.

ref
string

Your custom string used to refer to the supplier location. Either id or ref is required.

country_of_origin
required
string

Always required. ISO Alpha-2 country in which the product is manufactured

Responses
200

Created

Response Schema: application/json
_object
string
self
string
version
integer
object (Product)
_object
string

Type of the object

id
integer

The Flexport id used to refer to the product

name
string

The name of the product

sku
string

The SKU used to refer to the product

description
string

Description of product

archived_at
string or null <date-time>

If the product has been archived, the time it was archived. If the product is still active this will be null.

product_category
string

The category to group this product under

country_of_origin
string
Deprecated

[DEPRECATED] - Use the country_of_origin on the supplier field. The country the product was manufactured

client_verified
boolean

Indicates whether Client has verified this Product.

Array of objects (ProductProperty)

A user defined set of key-value objects to describe the product

Array of objects (HsCode)
Deprecated

DEPRECATED - HS codes can be found in the classifications array

Array of objects (ProductClassification)
400

error

post/products
Request samples
application/json
{
  • "name": "AC Adapter 12V",
  • "sku": "WDVCDFD-RM00472",
  • "description": "The best 12V AC Adapter on the market",
  • "product_category": "Cosmetics",
  • "country_of_origin": "China",
  • "client_verified": true,
  • "product_properties": [
    • {
      • "type": "color",
      • "value": "blue"
      }
    ],
  • "classifications": [
    • {
      • "codes": [
        ],
      • "region": "US",
      • "fees": [
        ]
      }
    ],
  • "suppliers": [
    • {
      • "id": 12345,
      • "ref": "FACTORY-123",
      • "country_of_origin": "CN"
      }
    ]
}
Response samples
application/json
{
  • "_object": "/api/response",
  • "version": 2,
  • "data": {
    • "_object": "/product",
    • "id": 84291,
    • "name": "AC Adapter 12V",
    • "sku": "WDVCDFD-RM00472",
    • "description": "The best 12V AC Adapter on the market",
    • "archived_at": "2019-01-18T22:08:38.599Z",
    • "product_category": "Cosmetics",
    • "country_of_origin": "China",
    • "client_verified": true,
    • "product_properties": [
      • {
        }
      ],
    • "hs_codes": [
      • {
        }
      ],
    • "classifications": [
      • {
        }
      ]
    }
}

Retrieve a single product

Returns the client's product with this ID

Request
path Parameters
id
required
string

Unique id for the product to be retrieved

Responses
200

Success

Response Schema: application/json
_object
string
self
string
version
integer
object (Product)
_object
string

Type of the object

id
integer

The Flexport id used to refer to the product

name
string

The name of the product

sku
string

The SKU used to refer to the product

description
string

Description of product

archived_at
string or null <date-time>

If the product has been archived, the time it was archived. If the product is still active this will be null.

product_category
string

The category to group this product under

country_of_origin
string
Deprecated

[DEPRECATED] - Use the country_of_origin on the supplier field. The country the product was manufactured

client_verified
boolean

Indicates whether Client has verified this Product.

Array of objects (ProductProperty)

A user defined set of key-value objects to describe the product

Array of objects (HsCode)
Deprecated

DEPRECATED - HS codes can be found in the classifications array

Array of objects (ProductClassification)
400

error

get/products/{id}
Response samples
application/json
{
  • "_object": "/api/response",
  • "version": 2,
  • "data": {
    • "_object": "/product",
    • "id": 84291,
    • "name": "AC Adapter 12V",
    • "sku": "WDVCDFD-RM00472",
    • "description": "The best 12V AC Adapter on the market",
    • "archived_at": "2019-01-18T22:08:38.599Z",
    • "product_category": "Cosmetics",
    • "country_of_origin": "China",
    • "client_verified": true,
    • "product_properties": [
      • {
        }
      ],
    • "hs_codes": [
      • {
        }
      ],
    • "classifications": [
      • {
        }
      ]
    }
}

Update a product

Update this product to represent the request payload

Request
path Parameters
id
required
string

Unique id for the product to be updated

Request Body schema: application/json
required
name
string

Name of product

sku
string

SKU of product

description
string

Description of product

product_category
string

The category of the product

country_of_origin
string

Nation in which the product is manufactured

client_verified
boolean

Indicates whether Client has verified this Product.

Array of objects (WriteProductProperty)

Array of product properties, custom key value pairs that describe the product

Array
type
required
string

Always required. User defined type of this property

value
required
string

Always required. Value of this property

Array of objects (WriteProductClassification)

Array of product classifications. If a value is specified, the array of product classifications will replace the existing set of product classifications.

Array
codes
required
Array of strings

Always required. An array of HS codes for this product in the provided region

region
required
string

Always required. The region for this classification. Currently only 2-character ISO codes and "EU" are supported

Array of objects (Fee)

An array of fees associated with this classification

Array of objects (WriteProductSupplier)

Array of suppliers. If a value is specified, the array of suppliers will replace the existing set of suppliers.

Array
id
integer

The supplier location ID. Either id or ref is required.

ref
string

Your custom string used to refer to the supplier location. Either id or ref is required.

country_of_origin
required
string

Always required. ISO Alpha-2 country in which the product is manufactured

Responses
200

Updated

Response Schema: application/json
_object
string
self
string
version
integer
object (Product)
_object
string

Type of the object

id
integer

The Flexport id used to refer to the product

name
string

The name of the product

sku
string

The SKU used to refer to the product

description
string

Description of product

archived_at
string or null <date-time>

If the product has been archived, the time it was archived. If the product is still active this will be null.

product_category
string

The category to group this product under

country_of_origin
string
Deprecated

[DEPRECATED] - Use the country_of_origin on the supplier field. The country the product was manufactured

client_verified
boolean

Indicates whether Client has verified this Product.

Array of objects (ProductProperty)

A user defined set of key-value objects to describe the product

Array of objects (HsCode)
Deprecated

DEPRECATED - HS codes can be found in the classifications array

Array of objects (ProductClassification)
400

error

patch/products/{id}
Request samples
application/json
{
  • "name": "AC Adapter 12V",
  • "sku": "WDVCDFD-RM00472",
  • "description": "The best 12V AC Adapter on the market",
  • "product_category": "Cosmetics",
  • "country_of_origin": "China",
  • "client_verified": true,
  • "product_properties": [
    • {
      • "type": "color",
      • "value": "blue"
      }
    ],
  • "classifications": [
    • {
      • "codes": [
        ],
      • "region": "US",
      • "fees": [
        ]
      }
    ],
  • "suppliers": [
    • {
      • "id": 12345,
      • "ref": "FACTORY-123",
      • "country_of_origin": "CN"
      }
    ]
}
Response samples
application/json
{
  • "_object": "/api/response",
  • "version": 2,
  • "data": {
    • "_object": "/product",
    • "id": 84291,
    • "name": "AC Adapter 12V",
    • "sku": "WDVCDFD-RM00472",
    • "description": "The best 12V AC Adapter on the market",
    • "archived_at": "2019-01-18T22:08:38.599Z",
    • "product_category": "Cosmetics",
    • "country_of_origin": "China",
    • "client_verified": true,
    • "product_properties": [
      • {
        }
      ],
    • "hs_codes": [
      • {
        }
      ],
    • "classifications": [
      • {
        }
      ]
    }
}