Export

WIP: A summary needs to be written for Export


POST/v3/export

Request Company Data Export

Request a data export for a company

Body parameters

  • Name
    tables
    Type
    array Required
    Description
    A list of table names for which the user wants to export data.

200 Response

  • Name
    code
    Type
    string
    Description
    The error code
  • Name
    documentation_url
    Type
    string
    Description
    An optional link to the documentation for the error
  • Name
    success
    Type
    boolean Required
    Description
    if successful, will be true. if not successful, will be false and message will contain a human readable error message
  • Name
    data
    Type
    object Required
    Description

Properties for data object

  • Name
    fileName
    Type
    string Required
    Description
    the name of the file to request a pre-signed URL for

4xx Response

  • Name
    code
    Type
    string
    Description
    The error code
  • Name
    documentation_url
    Type
    string
    Description
    An optional link to the documentation for the error
  • Name
    message
    Type
    string
    Description
    the error message if not successful
  • Name
    success
    Type
    boolean Required
    Description
    if successful, will be true. if not successful, will be false and message will contain a human readable error message

5xx Response

  • Name
    code
    Type
    string
    Description
    The error code
  • Name
    documentation_url
    Type
    string
    Description
    An optional link to the documentation for the error
  • Name
    message
    Type
    string
    Description
    the error message if not successful
  • Name
    success
    Type
    boolean Required
    Description
    if successful, will be true. if not successful, will be false and message will contain a human readable error message

Example Request
application/json

POST
/v3/export
curl https://api.shopmonkey.cloud/v3/export \ 
  -H "Authorization: Bearer ${SM_TOKEN}" \ 
  -X POST -H 'Content-Type: application/json' \ 
  --data '{ "tables" : [] }'

Example Response
application/json

{
  "success": true,
  "data": {
    "fileName": "fileName"
  }
}

POST/v3/export/presigned_url

Request Pre-signed URL for Data Export File

Request a pre-signed URL for a data export file

Body parameters

  • Name
    fileName
    Type
    string Required
    Description
    the name of the file to request a pre-signed URL for

200 Response

  • Name
    code
    Type
    string
    Description
    The error code
  • Name
    documentation_url
    Type
    string
    Description
    An optional link to the documentation for the error
  • Name
    success
    Type
    boolean Required
    Description
    if successful, will be true. if not successful, will be false and message will contain a human readable error message
  • Name
    data
    Type
    object Required
    Description

Properties for data object

  • Name
    url
    Type
    string Required
    Description
    a pre-signed url for downloading the export file

4xx Response

  • Name
    code
    Type
    string
    Description
    The error code
  • Name
    documentation_url
    Type
    string
    Description
    An optional link to the documentation for the error
  • Name
    message
    Type
    string
    Description
    the error message if not successful
  • Name
    success
    Type
    boolean Required
    Description
    if successful, will be true. if not successful, will be false and message will contain a human readable error message

5xx Response

  • Name
    code
    Type
    string
    Description
    The error code
  • Name
    documentation_url
    Type
    string
    Description
    An optional link to the documentation for the error
  • Name
    message
    Type
    string
    Description
    the error message if not successful
  • Name
    success
    Type
    boolean Required
    Description
    if successful, will be true. if not successful, will be false and message will contain a human readable error message

Example Request
application/json

POST
/v3/export/presigned_url
curl https://api.shopmonkey.cloud/v3/export/presigned_url \ 
  -H "Authorization: Bearer ${SM_TOKEN}" \ 
  -X POST -H 'Content-Type: application/json' \ 
  --data '{ "fileName" : "value" }'

Example Response
application/json

{
  "success": true,
  "data": {
    "url": "url"
  }
}

GET/v3/purchase_order/export

Export Purchase Orders

Export Purchase Orders data as Excel spreadsheet

200 Response

the data in excel format


4xx Response

  • Name
    code
    Type
    string
    Description
    The error code
  • Name
    documentation_url
    Type
    string
    Description
    An optional link to the documentation for the error
  • Name
    message
    Type
    string
    Description
    the error message if not successful
  • Name
    success
    Type
    boolean Required
    Description
    if successful, will be true. if not successful, will be false and message will contain a human readable error message

5xx Response

  • Name
    code
    Type
    string
    Description
    The error code
  • Name
    documentation_url
    Type
    string
    Description
    An optional link to the documentation for the error
  • Name
    message
    Type
    string
    Description
    the error message if not successful
  • Name
    success
    Type
    boolean Required
    Description
    if successful, will be true. if not successful, will be false and message will contain a human readable error message

Example Request

GET
/v3/purchase_order/export
curl https://api.shopmonkey.cloud/v3/purchase_order/export \ 
  -H "Authorization: Bearer ${SM_TOKEN}"

POST/v3/purchase_order/export

Export Purchase Orders

Export Purchase Orders data as Excel spreadsheet

200 Response

the data in excel format


4xx Response

  • Name
    code
    Type
    string
    Description
    The error code
  • Name
    documentation_url
    Type
    string
    Description
    An optional link to the documentation for the error
  • Name
    message
    Type
    string
    Description
    the error message if not successful
  • Name
    success
    Type
    boolean Required
    Description
    if successful, will be true. if not successful, will be false and message will contain a human readable error message

5xx Response

  • Name
    code
    Type
    string
    Description
    The error code
  • Name
    documentation_url
    Type
    string
    Description
    An optional link to the documentation for the error
  • Name
    message
    Type
    string
    Description
    the error message if not successful
  • Name
    success
    Type
    boolean Required
    Description
    if successful, will be true. if not successful, will be false and message will contain a human readable error message

Example Request
application/json

POST
/v3/purchase_order/export
curl https://api.shopmonkey.cloud/v3/purchase_order/export \ 
  -H "Authorization: Bearer ${SM_TOKEN}" \ 
  -X POST -H 'Content-Type: application/json' \ 
  --data '{}'