Export Products
POSThttps://euwest.api.elasticpath.com/pcm/products/export
The Export API is available to make bulk updates to products in Product Experience Manager. You might also export products for your personal requirements.
The Export API builds a CSV file containing the product entries. A CSV file can contain up to 50,000 product entries. If you have more than 50,000 product entries, then another CSV file is created and so on, until all your products are exported.
The Job endpoint response specifies the location where the CSV file is stored. See Characteristics of CSV Files.
Filtering
The following attributes and operators are supported.
Operator | Attribute | Description | Example |
---|---|---|---|
eq | sku , slug , upc_ean , manufacturer_part_num , name , description , tags | Equals. Checks if the values of two operands are equal. If they are, the condition is true. When filtering on tags, you can only specify one product tag. | filter=eq(name,some-name) |
In | sku , tags | Checks if the values are included in the specified string. If they are, the condition is true. When filtering on tags, you can specify a list of product tags. | filter=in(id,some-id) |
like | sku , slug , upc_ean , manufacturer_part_num , name , description | Like. Checks if the operand contains the specified string. Wildcards are supported. | filter=like(name,some-name) |
Request
Query Parameters
Set to true
if you want to use a template slug instead of a template ID when exporting products that have custom data.
Many Commerce API endpoints support filtering. The general syntax is described here, but you must go to a specific endpoint to understand the attributes and operators an endpoint supports.
For more information about the attributes and operators that this endpoint supports, see Export Products.
- application/json
Body
object
Responses
- 201
- 400
- 422
- 500
Export started
- application/json
- Schema
- Example (from schema)
- pending
Schema
data object
{
"data": {
"id": "string",
"type": "pim-job",
"attributes": {
"started_at": "2020-09-22T09:00:00",
"completed_at": "2020-09-22T09:00:00",
"created_at": "2020-09-22T09:00:00",
"updated_at": "2020-09-22T09:00:00",
"type": "child-products",
"status": "pending"
},
"meta": {
"x_request_id": "string",
"copied_from": "string",
"hierarchy_id": "string",
"file_locations": [
"string"
],
"filter": "string"
}
}
}
Successful Job
{
"data": {
"type": "pim-job",
"id": "7e1b9ba1-c844-4556-9b16-4ae3f0988b0f",
"attributes": {
"completed_at": null,
"created_at": "2024-01-05T15:27:23.161Z",
"started_at": null,
"status": "pending",
"type": "product-export",
"updated_at": "2024-01-05T15:27:23.161Z"
},
"meta": {
"file_locations": null,
"filter": "eq(sku,product-1)",
"x_request_id": "fad8c5c0-9546-4e0c-b68e-8a2d809891e5"
}
}
}
Bad request. The request failed validation.
- application/json
- Schema
- Example (from schema)
- bad-request
Schema
errors undefined[]required
{
"errors": [
{
"status": "500",
"title": "Internal server error",
"detail": "An internal error has occurred.",
"request_id": "00000000-0000-0000-0000-000000000000",
"meta": {
"missing_ids": [
"e7d50bd5-1833-43c0-9848-f9d325b08be8"
]
}
}
]
}
{
"errors": [
{
"title": "Bad Request",
"detail": "Could not parse the supplied filter",
"status": "400"
}
]
}
Bad request. The request failed validation.
- application/json
- Schema
- Example (from schema)
- failed-validation
Schema
errors undefined[]required
{
"errors": [
{
"status": "500",
"title": "Internal server error",
"detail": "An internal error has occurred.",
"request_id": "00000000-0000-0000-0000-000000000000",
"meta": {
"missing_ids": [
"e7d50bd5-1833-43c0-9848-f9d325b08be8"
]
}
}
]
}
{
"errors": [
{
"title": "Failed Validation",
"status": "422",
"detail": "<XYZ> can not be empty"
}
]
}
Internal server error. There was a system failure in the platform.
- application/json
- Schema
- Example (from schema)
- internal-server-error
Schema
errors undefined[]required
{
"errors": [
{
"status": "500",
"title": "Internal server error",
"detail": "An internal error has occurred.",
"request_id": "00000000-0000-0000-0000-000000000000",
"meta": {
"missing_ids": [
"e7d50bd5-1833-43c0-9848-f9d325b08be8"
]
}
}
]
}
{
"errors": [
{
"status": "500",
"title": "Internal Server Error",
"detail": "There was an internal server error, you can report with your request id.",
"request_id": "635da56d-75a1-43cd-b696-7ab119756b3a"
}
]
}
Authorization: http
name: bearerAuthtype: httpscheme: bearer
- curl
- python
- go
- nodejs
- ruby
- csharp
- php
- java
- powershell
- CURL
curl -L -X POST 'https://euwest.api.elasticpath.com/pcm/products/export' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{}'