Skip to content

Instantly share code, notes, and snippets.

@ches
Last active November 18, 2015 18:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ches/299f722ba17ffd5f83d6 to your computer and use it in GitHub Desktop.
Save ches/299f722ba17ffd5f83d6 to your computer and use it in GitHub Desktop.
Postman collection and environment (variables) for the Itembase API, initially imported from their Swagger spec. Import both into Postman and configure the environment with real values for your credentials. You'll need an OAuth access token for the user you're testing with, set as the `bearer_token` variable. Or alternatively, set up Postman's b…
{
"id": "998e122f-d471-338e-3576-4ae34e3fedac",
"name": "itembase API",
"description": "An API for requesting data from users connected to itembase.<p>You can issue range queries by datetimes or get single entities by id.</p><p>There are four entity types: Transaction, Product, Buyer and Profile. Entities that originate from the same data connection have the same <i>source_id</i>. Get the Profile resource which describes the user's profile on the remote platform (e.g. a seller's account, a shop profile) to understand where the related entities (i. E. with the same source_id) originate.</p>",
"order": [],
"folders": [
{
"id": "6407292f-a7b7-25f6-c1d8-65417d42fa37",
"name": "Buyers",
"description": "",
"order": [
"80af462f-2599-110d-ebee-78f4f1c081c6"
],
"owner": "144452"
},
{
"id": "1eface50-8ee5-3d28-5e80-abd3a0a96de3",
"name": "Products",
"description": "",
"order": [
"cd799c3c-c24f-42ed-c54b-5aa3ba514dbd",
"487808f3-5e5a-2922-1291-ab9f3d6d620d"
],
"owner": "144452"
},
{
"id": "4fc679ce-c076-1836-6027-016bf86ed3a7",
"name": "Shops",
"description": "",
"order": [
"c07cb841-26e2-b3cd-5ac8-e367f93b77e9"
],
"owner": "144452"
},
{
"id": "29960628-a0a1-0cdf-ae03-9ad4aef7e2ba",
"name": "Transactions",
"description": "Folder for users",
"order": [
"01fe5541-687a-57e0-1efe-dd514754dafb",
"3d6ebaa7-eea8-af89-2486-85df89de1638"
],
"owner": "144452",
"collectionId": "998e122f-d471-338e-3576-4ae34e3fedac"
}
],
"timestamp": 1413302258635,
"owner": "144452",
"remoteLink": "",
"public": false,
"requests": [
{
"id": "01fe5541-687a-57e0-1efe-dd514754dafb",
"headers": "Authorization: Bearer {{bearer_token}}\n",
"url": "{{base_url}}/users/{{user_id}}/transactions",
"preRequestScript": "",
"pathVariables": {},
"method": "GET",
"data": [],
"dataMode": "params",
"version": 2,
"tests": "",
"currentHelper": "normal",
"helperAttributes": {},
"time": 1447852551077,
"name": "Merchant Transactions Index",
"description": "Requests all Transaction entities from itembase for a specific authenticated user, where the requested entities match a set of search criteria. Transactions can be requested with no additional search parameters, in which case the request will query all transactions for the authenticated user. Regardless of whether the request includes search parameters or not, by default only a subset of matched Transaction entities are returned (a maximum of 50 entities). Note however, that a successful query response will include fields \"num_documents_found\" (which gives the total number of entities which match the search criteria) and \"num_documents_returned\" (which gives the number of entities returned in the payload). This information can be used to construct additional paginated requests. A successful response returns a sorted list of entities, ordered by default by the field \"created_at\" in descending order (i.e. newest first). The sort order can be changed by altering the request parameters below.",
"collectionId": "998e122f-d471-338e-3576-4ae34e3fedac",
"responses": []
},
{
"id": "3d6ebaa7-eea8-af89-2486-85df89de1638",
"headers": "Authorization: Bearer {{bearer_token}}\n",
"url": "{{base_url}}/users/{{user_id}}/transactions/:id",
"preRequestScript": "",
"pathVariables": {
"id": "6ee2e2d9f7baea5132ab79b"
},
"method": "GET",
"data": [],
"dataMode": "params",
"version": 2,
"tests": "",
"currentHelper": "normal",
"helperAttributes": {},
"time": 1447852974116,
"name": "Show Merchant Transaction",
"description": "The transaction endpoint requests a single specific Transaction entity from itembase for a specific user and for a specific transaction id.",
"collectionId": "998e122f-d471-338e-3576-4ae34e3fedac",
"responses": []
},
{
"id": "487808f3-5e5a-2922-1291-ab9f3d6d620d",
"headers": "Authorization: Bearer {{bearer_token}}\n",
"url": "{{base_url}}/users/{{user_id}}/products",
"preRequestScript": "",
"pathVariables": {},
"method": "GET",
"data": [],
"dataMode": "params",
"version": 2,
"tests": "",
"currentHelper": "normal",
"helperAttributes": {},
"time": 1447855243501,
"name": "Merchant Products Index",
"description": "Requests all Product entities from itembase for a specific authenticated user, where the requested entities match a set of search criteria. Products can be requested with no additional search parameters, in which case the request will query all products for the authenticated user. Regardless of whether the request includes search parameters or not, by default only a subset of matched Product entities are returned (a maximum of 50 entities). Note however, that a successful query response will include fields \"num_documents_found\" (which gives the total number of entities which match the search criteria) and \"num_documents_returned\" (which gives the number of entities returned in the payload). This information can be used to construct additional paginated requests. A successful response returns a sorted list of entities, ordered by default by the field \"created_at\" in descending order (i.e. newest first). The sort order can be changed by altering the request parameters below.",
"collectionId": "998e122f-d471-338e-3576-4ae34e3fedac",
"responses": []
},
{
"id": "80af462f-2599-110d-ebee-78f4f1c081c6",
"headers": "Authorization: Bearer {{bearer_token}}\n",
"url": "{{base_url}}/users/{{user_id}}/buyers/:id",
"preRequestScript": "",
"pathVariables": {
"id": null
},
"method": "GET",
"data": [],
"dataMode": "params",
"version": 2,
"tests": "",
"currentHelper": "normal",
"helperAttributes": {},
"time": 1447870009128,
"name": "Show Buyer",
"description": "The Buyer endpoint returns a Buyer entity by id.\n",
"collectionId": "998e122f-d471-338e-3576-4ae34e3fedac",
"responses": []
},
{
"id": "c07cb841-26e2-b3cd-5ac8-e367f93b77e9",
"headers": "Authorization: Bearer {{bearer_token}}\n",
"url": "{{base_url}}/users/{{user_id}}/profiles",
"preRequestScript": "",
"pathVariables": {},
"method": "GET",
"data": [],
"dataMode": "params",
"version": 2,
"tests": "",
"currentHelper": "normal",
"helperAttributes": {},
"time": 1447855332874,
"name": "Show User Profile",
"description": "The user Profile endpoint returns the general profile information of the users on the remote platform, e.g. general eBay seller account details.\n\nThis is terribly named, but a \"user profile\" really is essentially a merchant shop. Itembase pivoted from other things, and their API designs suffers from changed of focus.",
"collectionId": "998e122f-d471-338e-3576-4ae34e3fedac",
"responses": []
},
{
"id": "cd799c3c-c24f-42ed-c54b-5aa3ba514dbd",
"headers": "Authorization: Bearer {{bearer_token}}\n",
"url": "{{base_url}}/users/{{user_id}}/products/:id",
"preRequestScript": "",
"pathVariables": {
"id": null
},
"method": "GET",
"data": [],
"dataMode": "params",
"version": 2,
"tests": "",
"currentHelper": "normal",
"helperAttributes": {},
"time": 1447869998254,
"name": "Show Product",
"description": "The product endpoint requests a single specific product entity from itembase for a specific user and for a specific product id.",
"collectionId": "998e122f-d471-338e-3576-4ae34e3fedac",
"responses": []
}
]
}
{
"id": "d8ee1407-d7e2-60a3-f905-61896360d6e3",
"name": "Itembase – Sandbox",
"values": [
{
"key": "api_version",
"value": "v1",
"type": "text",
"name": "api_version",
"enabled": true
},
{
"key": "base_url",
"value": "http://sandbox.api.itembase.io/{{api_version}}",
"type": "text",
"name": "base_url",
"enabled": true
},
{
"key": "client_id",
"value": "XXX",
"type": "text",
"name": "client_id",
"enabled": true
},
{
"key": "client_secret",
"value": "XXX",
"type": "text",
"name": "client_secret",
"enabled": true
},
{
"key": "bearer_token",
"value": "XXX",
"type": "text",
"name": "bearer_token",
"enabled": true
},
{
"key": "user_id",
"value": "13ac2c74-7de3-4436-9a6d-2c94dd2b1fd3",
"type": "text",
"name": "user_id",
"enabled": true
}
],
"timestamp": 1447853459841,
"synced": false,
"syncedFilename": ""
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment