Shopify API

Vertex Shopify API Specifications
Documentation
Headers
OAuth2
Authorization
string required
Applied to all operations

OAuth2 bearer token (JSON Web Token) obtained by exchanging customer admin user credentials from the configured identity server.

Example:
Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c
Basic Auth
username
string required
Applied to all operations
Example:
shopifyApiUser123
password
string required
Applied to all operations
Min length: 20
Max length: 20
Example:
asdhj-1sd67-h5ahs-adn76a
Parameters
Pagination
Hmac
Object
hmac
string

Hmac value from shopify

Example:
nwdaywuyqwe83ahwe8y238y4
requestData
string

Request data

Example:
host=YWRtaW4uc2hvcGlmeS5jb20vc3RvcmUvdmVydGV4ZGV2c3RvcmU&shop=vertexdevstore.myshopify.com&timestamp=1678960003
shop
string

Name of the shop

Responses
Client Error Responses
400 Bad Request 400
Applied to all operations

Bad request. The server cannot or will not process the request due to malformed request syntax, invalid request message framing, or deceptive request routing

Body
Examples
{
    "id":"abchd123-sfSfbjhf76-2bhbK",
    "type": "app/install",
    "version": "v1",
    "title": "Bad Request",
    "status": 400,
    "detail": "Bad request. The server cannot or will not process the request due to malformed request syntax, invalid request message framing, or deceptive request routing. Stacktrace - <exception in short>",
    "timestamp": "2023-03-14T03:14:44Z",
    "relatedTo": "VertexDevStore"
}

Bad data example 2. <message> - Unable get access token.

{
    "id": "abchd123-sfSfbjhf76-2bhbK",
    "version": "v2",
    "type": "shopify/tax_calculate",
    "title": "Bad request",
    "status": 400,
    "detail": "Bad request. Unable to process request. <message>",
    "timestamp": "2023-03-09T08:39:11Z",
    "relatedTo": "VertexDevStore"
}
401 Unauthorized 401
Applied to all operations

Authentication failure. There were no client credentials provided with request or the credentials were invalid. The client must authenticate itself to get the requested response.

Body
Examples
{
    "id":"abchd123-sfSfbjhf76-2bhbK",
    "type": "shopify/onboarding",
    "version": "v1",
    "title": "Unauthorized",
    "status": 401,
    "detail": "Authentication failure. Invalid user credntials.",
    "timestamp": "2023-03-14T03:14:44Z",
    "relatedTo": "VertexDevStore"
}
403 Forbidden 403
Applied to all operations

The HTTP 403 Forbidden response status code indicates that the server understands the request but refuses to authorize it.

Body
Examples
{
    "id": "abchd123-sfSfbjhf76-2bhbK",
    "version": "v1",
    "type": "shopify/onboarding",
    "title": "The server understands the request but refuses to authorize it.",
    "status": 403,
    "detail": "The server understands the request but refuses to authorize it.",
    "timestamp": "2023-03-09T08:39:11Z",
    "relatedTo": "VertexDevStore"
}
404 Not found 404
Applied to all operations

The resource being read or updated does not exist.

Body
Examples
{
    "id": "abchd123-sfSfbjhf76-2bhbK",
    "version": "v1",
    "type": "app/uninstall",
    "title": "Resource not found",
    "status": 404,
    "detail": "The resource being read or updated does not exist.",
    "timestamp": "2023-03-09T08:39:11Z",
    "relatedTo": "VertexDevStore"
}
Server Error responses
500 Internal Server Error 500
Applied to all operations

Server encountered an unexpected condition that prevented it from fulfilling the request

Body
Examples
{
    "type": "shopify/calculate_taxes",
    "version": "v1",
    "title": "Internal Server Error",
    "status": 500,
    "detail": "Server encountered an unexpected condition. Stacktrace - <exception>",
    "timestamp": "2023-03-09T08:39:11Z",
    "relatedTo": "shopifydevstore"
}

<Excpetion> should bee as short as possible.

{
    "type": "shopify/calculate_taxes",
    "title": "Internal Server Error",
    "status": 500,
    "detail": "Server encountered an unexpected condition - Exception in thread "main" java.lang.NullPointerException at com.example.myproject.Book.getTitle(Book.java:16) at com.example.myproject.Author.getBookTitles(Author.java:25)",
    "timestamp": "2023-03-09T08:39:11Z",
    "relatedTo": "shopifydevstore"
}
501 Not Implemented 501
Applied to all operations

Method not implemented. The server does not support the functionality required to fulfill the request.

Body
Examples
{
    "id": "abchd123-sfSfbjhf76-2bhbK",
    "version": "v1",
    "type": "app/install",
    "title": "Method not implemented",
    "status": 501,
    "detail": "Method not implemented. The server does not support the functionality required to fulfill the request.",
    "timestamp": "2023-03-09T08:39:11Z",
    "relatedTo": "VertexDevStore"
}
503 Service Unavailable 503
Applied to all operations

The server is not ready to handle the request.

Body
Examples
{
    "type": "/api/tokens",
    "title": "Service Unavailable",
    "status": 503,
    "detail": "Server is not ready to handle the request.",
    "timestamp": "2023-03-14T18:39:21Z",
    "relatedTo": "shopifydevstore"
}
502 Bad Gateway 502
Applied to all operations

Server working as a gateway got an invalid response.

Body
Examples
{
    "id": "abchd123-sfSfbjhf76-2bhbK",
    "version": "v2",
    "type": "app/install",
    "title": "Bad Request",
    "status": 502,
    "detail": "Bad Request. The server cannot or will not process the request due to malformed request syntax, invalid request message framing, or deceptive request routing. Stacktrace - <stacktrace> ",
    "timestamp": "2023-03-09T08:39:11Z",
    "relatedTo": "VertexDevStore"
}

stacktrace - Exception in thread “main” java.lang.NullPointerException at com.example.myproject.Book.getTitle(Book.java:16) at com.example.myproject.Author.getBookTitles(Author.java:25)

{
    "id": "asd34123-sfSfbjhf76-2bhbK",
    "version": "v2",
    "type": "app/install",
    "title": "Bad Request",
    "status": 502,
    "detail": "Bad Request. The server cannot or will not process the request due to malformed request syntax, invalid request message framing, or deceptive request routing. Stacktrace - Exception in thread \"main\" java.lang.NullPointerException         at com.example.myproject.Book.getTitle(Book.java:16)         at com.example.myproject.Author.getBookTitles(Author.java:25) ",
    "timestamp": "2023-03-09T08:39:11Z",
    "relatedTo": "VertexDevStore"
}
Model
TokenRequestResource
Object
code
string
hmac
string
host
string
shop
string
Errors, Exceptions and Response object
Issue
LogError

Issue Details object

Object
id
string uuid

This is unique Id aaosciated with the issue occurred.

Example:
abchd123-sfSfbjhf76-2bhbK
version
string

API version

Examples:
v1v2
type
string uri

The URI reference. It’s the URI where the issue has occurred or related to.

Examples:
shopify/tax_calculateshopify/onboardingapp/installapp/uninstallshopify/token
title
string

A short summary otf the issue type, human-readable summary of the error or problem type.

Examples:
Request timeout has occurredService unavailableBad RequestResource not foundUnauthorized request
status
integer int32

The HTTP status code

Min: 400
Max: 600
exclusive
Examples:
400401500502
detail
string

Detailed human-readable explanation specific to this occurrence of the issue.

Examples:
Stacktrace - java.net.ConnectException: Connection timed out: connectStacktrace - Exception in thread "main" java.lang.NullPointerException at com.example.myproject.Book.getTitle(Book.java:16) at com.example.myproject.Author.getBookTitles(Author.java:25)Bad request. The server cannot or will not process the request due to malformed request syntax, invalid request message framing, or deceptive request routing. Stacktrace - <exception>Authentication failure. Invalid user credntials.
timestamp
string date-time

Timestamp specifying the date and time the issue was encountered

Example:
2023-03-09T08:39:11Z
relatedTo
string

Store url or Id, user or machine, client that observed this error or issue.

Examples:
vertexdevstore.myshopify.comor 73674283
ShoppifyConnectionException
Exceptions
LogError

Shopify connection failed.

All of
Object
VertexConnectionException
Exceptions
LogError

Vertex connection failed.

All of
Example:
{
    "id": "abchd123-sfSfbjhf76-2bhbK",
    "type": "shopify/tax_calculate",
    "title": "Vertex connection failed",
    "status": 401,
    "detail": "Authentication failure. Invalid user credntials.",
    "timestamp": "2023-03-09T08:39:11Z",
    "occurredBy": "VertexDevStore"
}
Object
InvalidRequestException
Exceptions
LogError

Request is invalid.

Data volume objects
DataVolumeResource
LogInfo

Data volume object describes the application data statistics for that timestamp

Object
Example:
{
    "id": "dv-ashd2s8has7hsdh",
    "dateCreated": "2023-03-09T08:39:11Z",
    "keyword": "quotation",
    "throughput": "60000",
    "incompleteOnboarding": 45,
    "completeOnboarding": 35,
    "failedOnboarding": 25,
    "latency": 1
}
id
string required

The data volume identifier

Max length: 20
Example:
dv-ashd2s8has7hsdh
dateCreated
string date-time required

Timestamp when the event was created

Example:
2023-03-09T08:39:11Z
keyword
string required

Type fo request for which event is created.

Examples:
quotationinvoiceonboarding
throughput
number

Number fo request received per minute.

Examples:
2000060000
incompleteOnboarding
number required

Number of merchant Authorized but with incomplete Onboarding.

Example:
45
completeOnboarding
number required

Number of merchant Authorized with complete Onboarding.

Example:
35
failedOnboarding
number required

Number of merchant Authorized but with failed Onboarding.

Example:
25
latency95
number

95% percetile latency in seconds.

Examples:
1.22.5
latency90
number

90% percetile latency in seconds.

Examples:
0.50.9