Chilkat Online Tools

Delphi (DLL) / Marketplacer SELLER API / Get Invoices Not Dispatched

Back to Collection Items

var

begin
CkHttp_putBasicAuth(http,True);CkHttp_putLogin(http,'{{username}}');CkHttp_putPassword(http,'{{password}}');CkJsonObject_UpdateString(json,'query','query GetInvoicesNotDispatched($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 + '}');CkJsonObject_UpdateString(json,'variables','{' + #10 + '	"pageSize": 5,' + #10 + '	"endCursor": null,' + #10 + '	"filters": {' + #10 + '		"notDispatched": true' + #10 + '	}' + #10 + '}');success := CkHttp_HttpJson(http,'POST','https://bestfriendbazaar.com/graphql',json,'application/json',resp);


Curl Command

curl -X POST
	-u '{{username}}:{{password}}'
	-H "MARKETPLACER-API-KEY: {{api_key}}"
	-H "Content-Type: application/json"
	--data-raw '{"query":"query GetInvoicesNotDispatched($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\"notDispatched\": true\n\t}\n}"}'
https://bestfriendbazaar.com/graphql

Postman Collection Item JSON

{
  "name": "Get Invoices Not Dispatched",
  "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 GetInvoicesNotDispatched($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\"notDispatched\": true\n\t}\n}"
      }
    },
    "url": {
      "raw": "{{base_url}}",
      "host": [
        "{{base_url}}"
      ],
      "path": null
    },
    "description": null
  },
  "response": [
  ]
}