Delphi (ActiveX) / Marketplacer SELLER API / Get Invoices Created Since
Back to Collection Items
var
begin
http.BasicAuth := 1;http.Login := '{{username}}';http.Password := '{{password}}';json.UpdateString('query','query GetInvoicesCreatedSince($pageSize: Int $endCursor: String, $filters: InvoiceFilters){' + #10 + ' invoices(first : $pageSize, after: $endCursor filters: $filters){ ' + #10 + ' nodes{' + #10 + ' id' + #10 + ' createdAt' + #10 + ' statusFlags' + #10 + ' lineItems{' + #10 + ' id' + #10 + ' quantity' + #10 + ' quantityAwaitingDispatch' + #10 + ' }' + #10 + ' }' + #10 + ' }' + #10 + '}');json.UpdateString('variables','{' + #10 + ' "pageSize": 5,' + #10 + ' "endCursor": null,' + #10 + ' "filters": {' + #10 + ' "createdSince": "2022-08-04T11:25:08-07:00"' + #10 + ' }' + #10 + '}');
Curl Command
curl -X POST
-u '{{username}}:{{password}}'
-H "MARKETPLACER-API-KEY: {{api_key}}"
-H "Content-Type: application/json"
--data-raw '{"query":"query GetInvoicesCreatedSince($pageSize: Int $endCursor: String, $filters: InvoiceFilters){\n invoices(first : $pageSize, after: $endCursor filters: $filters){ \n\t\tnodes{\n\t\t\tid\n\t\t\tcreatedAt\n\t\t\tstatusFlags\n\t\t\tlineItems{\n\t\t\t\tid\n\t\t\t\tquantity\n\t\t\t\tquantityAwaitingDispatch\n\t\t\t}\n\t\t}\n\t}\n}","variables":"{\n\t\"pageSize\": 5,\n\t\"endCursor\": null,\n\t\"filters\": {\n\t\t\"createdSince\": \"2022-08-04T11:25:08-07:00\"\n\t}\n}"}'
https://bestfriendbazaar.com/graphql
Postman Collection Item JSON
{
"name": "Get Invoices Created Since",
"request": {
"method": "POST",
"header": [
{
"key": "MARKETPLACER-API-KEY",
"value": "{{api_key}}",
"type": "text"
},
{
"key": "Content-Type",
"value": "application/json",
"type": "text"
}
],
"body": {
"mode": "graphql",
"graphql": {
"query": "query GetInvoicesCreatedSince($pageSize: Int $endCursor: String, $filters: InvoiceFilters){\n invoices(first : $pageSize, after: $endCursor filters: $filters){ \n\t\tnodes{\n\t\t\tid\n\t\t\tcreatedAt\n\t\t\tstatusFlags\n\t\t\tlineItems{\n\t\t\t\tid\n\t\t\t\tquantity\n\t\t\t\tquantityAwaitingDispatch\n\t\t\t}\n\t\t}\n\t}\n}",
"variables": "{\n\t\"pageSize\": 5,\n\t\"endCursor\": null,\n\t\"filters\": {\n\t\t\"createdSince\": \"2022-08-04T11:25:08-07:00\"\n\t}\n}"
}
},
"url": {
"raw": "{{base_url}}",
"host": [
"{{base_url}}"
],
"path": null
},
"description": null
},
"response": [
]
}