Create import
POST
/merchants/{merchantCode}/imports
const url = 'https://import.shopgate.io/v1/merchants/example/imports';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"source":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://import.shopgate.io/v1/merchants/example/imports \ --header 'Content-Type: application/json' \ --data '{ "source": "example" }'Create a new import
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”merchantCode
required
string
Request Body
Section titled “Request Body”Media typeapplication/json
object
source
string
Examplegenerated
{ "source": "example"}Responses
Section titled “Responses”Import created
Media typeapplication/json
object
ref
string
Example
{ "ref": "87eff434-4f89-4d83-a8c6-117e10817034"}Validation error
Media typeapplication/json
object
errors
Array<object>
object
code
required
Machine readable error code
string
field
required
The parameter-field, that failed to validate, like “sequenceId”
string
message
required
Human readable error code
string
value
The value, that was sent, like “xxx”
string
Example
{ "errors": [ { "code": "INVALID_TOKEN" } ]}Forbidden error
Media typeapplication/json
object
code
required
string
message
required
string
Example
{ "code": "Forbidden", "message": "No access to merchant 1"}
