Delphi (ActiveX) / Marketplacer SELLER API / Invoice Annotation Create
Back to Collection Items
var
begin
http.BasicAuth := 1;http.Login := '{{username}}';http.Password := '{{password}}';json.UpdateString('query','mutation InvoiceAnnotationCreate(' + #10 + ' $invoiceId: ID!' + #10 + ' $invoiceAnnotationTypeId: ID!' + #10 + ' $attributes: InvoiceAnnotationInput!' + #10 + ') {' + #10 + ' invoiceAnnotationCreate(' + #10 + ' input: {' + #10 + ' invoiceId: $invoiceId' + #10 + ' invoiceAnnotationTypeId: $invoiceAnnotationTypeId' + #10 + ' attributes: $attributes' + #10 + ' }' + #10 + ' ) {' + #10 + ' errors {' + #10 + ' field' + #10 + ' messages' + #10 + ' }' + #10 + ' invoiceAnnotation {' + #10 + ' id' + #10 + ' }' + #10 + ' }' + #10 + '}');json.UpdateString('variables','{' + #10 + ' "invoiceId": "SW52b2ljZS0xMDAwMA==",' + #10 + ' "invoiceAnnotationTypeId": "SW52b2ljZUFubm90YXRpb25UeXBlLTg=",' + #10 + ' "attributes": {' + #10 + ' "content": "Courier Picked Up",' + #10 + ' "resolved": false' + #10 + ' }' + #10 + '}');success := http.HttpJson('POST','https://bestfriendbazaar.com/graphql',json.ControlInterface,'application/json',resp.ControlInterface);
Curl Command
curl -X POST
-u '{{username}}:{{password}}'
-H "MARKETPLACER-API-KEY: {{api_key}}"
-H "Content-Type: application/json"
--data-raw '{"query":"mutation InvoiceAnnotationCreate(\n\t$invoiceId: ID!\n\t$invoiceAnnotationTypeId: ID!\n\t$attributes: InvoiceAnnotationInput!\n) {\n\tinvoiceAnnotationCreate(\n\t\tinput: {\n\t\t\tinvoiceId: $invoiceId\n\t\t\tinvoiceAnnotationTypeId: $invoiceAnnotationTypeId\n\t\t\tattributes: $attributes\n\t\t}\n\t) {\n\t\terrors {\n\t\t\tfield\n\t\t\tmessages\n\t\t}\n\t\tinvoiceAnnotation {\n\t\t\tid\n\t\t}\n\t}\n}","variables":"{\n\t\"invoiceId\": \"SW52b2ljZS0xMDAwMA==\",\n\t\"invoiceAnnotationTypeId\": \"SW52b2ljZUFubm90YXRpb25UeXBlLTg=\",\n\t\"attributes\": {\n\t\t\"content\": \"Courier Picked Up\",\n\t\t\"resolved\": false\n\t}\n}"}'
https://bestfriendbazaar.com/graphql
Postman Collection Item JSON
{
"name": "Invoice Annotation Create",
"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": "mutation InvoiceAnnotationCreate(\n\t$invoiceId: ID!\n\t$invoiceAnnotationTypeId: ID!\n\t$attributes: InvoiceAnnotationInput!\n) {\n\tinvoiceAnnotationCreate(\n\t\tinput: {\n\t\t\tinvoiceId: $invoiceId\n\t\t\tinvoiceAnnotationTypeId: $invoiceAnnotationTypeId\n\t\t\tattributes: $attributes\n\t\t}\n\t) {\n\t\terrors {\n\t\t\tfield\n\t\t\tmessages\n\t\t}\n\t\tinvoiceAnnotation {\n\t\t\tid\n\t\t}\n\t}\n}",
"variables": "{\n\t\"invoiceId\": \"SW52b2ljZS0xMDAwMA==\",\n\t\"invoiceAnnotationTypeId\": \"SW52b2ljZUFubm90YXRpb25UeXBlLTg=\",\n\t\"attributes\": {\n\t\t\"content\": \"Courier Picked Up\",\n\t\t\"resolved\": false\n\t}\n}"
}
},
"url": {
"raw": "{{base_url}}",
"host": [
"{{base_url}}"
],
"path": null
},
"description": null
},
"response": [
]
}