Giter Site home page Giter Site logo

export-api-examples's Introduction

BETA

###This endpoint is currently in beta. It is subject to change without notice.

Purpose

This endpoint will allow you to get bulk payment and order data from merchants that have installed your app. This service is not real-time, but will significantly reduce your chances of hitting an API limit restriction. Developers that require order and payment histories on merchants should integrate this service into their data collecting implementation.

Usage Notes

  • Availability of the service:

    Outside of these times, we return a 503 with available hours.

  • 1000 objects per file returned. If your response is more than 1000 objects we'll return an array of files to capture.

  • Each export file is available for 24hrs after which we'll delete it.

  • The max time range is 30 days. So if you want spans of data longer than that, you'll need to send a few requests.

  • The server can only handle a few concurrent exports at a time You will need to wait for each export to finish before starting another one. The server will throw 503s when the concurrency threshold is reached.

How to use

You will do the POST call to /v3/merchants/{merchant_Id}/exports with the appropriate payload. The payload includes:
export_type (PAYMENTS or ORDERS)
start_time (in UTC)
end_time (in UTC)

  {
      "type": export_type,
      "startTime": start_time,
      "endTime": end_time
  }

The response of the exports object will include the export id for you to use.

{
  "id": "export_id",
  "type": "ORDERS",
  "status": "PENDING",
  "percentComplete": 0,
  "startTime": start_time,
  "endTime": end_time,
  "createdTime": created_time,
  "modifiedTime": modified_time,
  "merchantRef": {
    "id": "merchant_id"
  }
}

Once the call has been made, you will occasionally do a GET call to /v3/merchants/{merchant_Id}/exports/{export_Id} to check the status and percent complete.

STATUS: PENDING - In queue to be processed
IN_PROGRESS - Being processed
DONE - Process complete

{
  "status": "PENDING",
  "modifiedTime": modified_time,
  "merchantRef": {
    "id": "merchant_id"
  },
  "percentComplete": 0,
  "startTime": start_time,
  "createdTime": created_time,
  "endTime": end_time,
  "type": "ORDERS",
  "id": "export_id"
}

Once it is complete your export object will include urls to the files for you to download the export.

{
  "id": "export_id",
  "type": "ORDERS",
  "status": "DONE",
  "percentComplete": 100,
  "availableUntil": available_until_time,
  "startTime": start_time,
  "endTime": end_time,
  "createdTime": created_time,
  "modifiedTime": modified_time,
  "exportUrls": {
    "elements": [
      {
        "url": URL,
        "export": {
          "id": "export_id"
        }
      }
    ]
  },
  "merchantRef": {
    "id": "merchant_id"
  }
}

export-api-examples's People

Contributors

jamescha avatar markrmullan avatar miguelmontemayor avatar rayramsay avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.