Skip to content

Check a shop’s address and credentials without saving them

POST
/products/{productId}/integrations/test
curl --request POST \
--url https://api.motenya.app/v1/products/example/integrations/test \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "type": "magento2", "baseUrl": "example", "credentials": { "additionalProperty": "example" } }'

Returns the shop’s websites when it answers; CONNECTION_REFUSED or CONNECTION_FAILED otherwise.

Requires crm:configure.

productId
required
string
>= 1 characters <= 64 characters
Media typeapplication/json
object
type
required
string
Allowed values: magento2 magento1
baseUrl
required

The shop’s https address.

string
<= 500 characters
credentials
required

Magento2: { "accessToken" }. magento1: { "apiUser", "apiKey", "currency" } (the shop’s ISO 4217 currency, which its API cannot tell).

object
key
additional properties
string
<= 500 characters

Success

Media typeapplication/json
object
name
required
string
websites
required
Array<object>
object
externalId
required
string
name
required
string
currency
required
string
baseUrl
required
string | null
key
additional properties

Example generated

{
"name": "example",
"websites": [
{
"externalId": "example",
"name": "example",
"currency": "example",
"baseUrl": "example"
}
]
}

Invalid request

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
field
string
details
Array<object>
object
code
required
string
message
required
string
field
string

Example

{
"error": {
"code": "SLUG_TAKEN"
}
}

Missing, invalid, revoked or expired API key

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
field
string
details
Array<object>
object
code
required
string
message
required
string
field
string

Example

{
"error": {
"code": "SLUG_TAKEN"
}
}

Missing scope, API turned off, published article without publish scope, or account suspended

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
field
string
details
Array<object>
object
code
required
string
message
required
string
field
string

Example

{
"error": {
"code": "SLUG_TAKEN"
}
}

Not found, or outside the knowledge bases this key may use

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
field
string
details
Array<object>
object
code
required
string
message
required
string
field
string

Example

{
"error": {
"code": "SLUG_TAKEN"
}
}

Slug or translation already exists

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
field
string
details
Array<object>
object
code
required
string
message
required
string
field
string

Example

{
"error": {
"code": "SLUG_TAKEN"
}
}

Rejected by validation (e.g. unknown language or category)

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
field
string
details
Array<object>
object
code
required
string
message
required
string
field
string

Example

{
"error": {
"code": "SLUG_TAKEN"
}
}

Rate limited; see Retry-After

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
field
string
details
Array<object>
object
code
required
string
message
required
string
field
string

Example

{
"error": {
"code": "SLUG_TAKEN"
}
}

Internal error