What and where I must type? to do this:
All data that is passed to the API must be encoded in UTF-8.
JSON API (Recommended Method)
Communication with the service is carried out by sending HTTP requests, using the POST method, to the specified address using the text data exchange format “JSON”.
“OAuth 2” is used to authenticate the request. With this type of authentication, you must use a token, which can be obtained in your personal account in the “Profile” section. Then, accordingly, include this token in the request header, for example, as: ‘Authorization: Bearer your_token’.
{
“phone” : [“380989361131”],
“message” : “test text”,
“src_addr” : “VashZakaz”
}
- And this from :
Request url
https://api.novaposhta.ua/v2.0/ {format }/ [json or xml]
Request parameters
formatstring
JSON, XML formats
Request headers
Content-Type (optional) string The format type of the text sent to the API.
{
"apiKey": "[ВАШ КЛЮЧ]",
"modelName": "InternetDocument",
"calledMethod": "save",
"methodProperties": {
"PayerType": "Sender",
"PaymentMethod": "Cash",
"DateTime": "02.03.2015",
"CargoType": "Cargo",
"VolumeGeneral": "0.1",
"Weight": "10",
"ServiceType": "WarehouseDoors",
"SeatsAmount": "1",
"Description": "абажур",
"Cost": "500",
"CitySender": "8d5a980d-391c-11dd-90d9-001a92567626",
"Sender": "6e9acced-d072-11e3-95eb-0050568046cd",
"SenderAddress": "01ae2635-e1c2-11e3-8c4a-0050568002cf",
"ContactSender": "d0b9f592-b600-11e4-a77a-005056887b8d",
"SendersPhone": "380678734567",
"CityRecipient": "db5c8892-391c-11dd-90d9-001a92567626",
"Recipient": "d00f2319-b743-11e4-a77a-005056887b8d",
"RecipientAddress": "511fcfbd-e1c2-11e3-8c4a-0050568002cf",
"ContactRecipient": "bc7b61ea-b6eb-11e4-a77a-005056887b8d",
"RecipientsPhone": "380631112223"
}
}
*Code or Custom... ?*
*Show example whith head pdrametres URL, Method..*