From Ample Owl, 4 Months ago, written in PowerShell.
Embed
  1. $url = "https://api.bring.com/booki...";
  2. $jsondata = '{"testIndicator":true,"schemaVersion":1,"consignments":[{"shippingDateTime":"2022-05-15T10:00:00","customerSpecifiedDeliveryDateTime":"2022-05-16T10:00:00","parties":{"sender":{"name":"Ola Nordmann","addressLine":"Testsvingen 12","addressLine2":null,"postalCode":"0263","city":"OSLO","countryCode":"no","reference":"1234","additionalAddressInfo":"Hentes på baksiden etter klokken to","contact":{"name":"Trond Nordmann","email":"[email protected]","phoneNumber":"99999999"}},"recipient":{"name":"Tore Mottaker","addressLine":"Mottakerveien 14","addressLine2":"c/o Tina Mottaker","postalCode":"0659","city":"OSLO","countryCode":"no","reference":"43242","additionalAddressInfo":"Bruk ringeklokken","contact":{"name":"Tore mottaker","email":"[email protected]","phoneNumber":"88888888"}},"pickupPoint":null},"product":{"id":"5600","customerNumber":"5","additionalServices":[{"id":"EVARSLING","email":"[email protected]","mobile":"97777777"}]},"purchaseOrder":null,"correlationId":"INTERNAL-123456","packages":[{"weightInKg":1.1,"goodsDescription":"Testing equipment","dimensions":{"heightInCm":13,"widthInCm":23,"lengthInCm":10},"containerId":null,"packageType":null,"numberOfItems":null,"correlationId":"PACKAGE-123"}]}]}';
  3.  
  4. $headers = [
  5. 'X-Mybring-API-Uid: [email protected]',
  6. 'X-Mybring-API-Key: a656515e-db61-48c7-ac86-1de6f0e9f4e4',
  7. 'X-Bring-Client-URL:https://trenogmat.no',
  8. 'Accept:application/json',
  9. 'Content-Type:application/json'
  10. ];