Gönderi oluşturmak için gönderici adresi oluşturmanız gerekiyor. Aşağıda örnek adres oluşturma isteği ve cevabını görebilirsiniz.
curl --request POST \
--url https://api.geliver.io/api/v1/addresses \
--header 'Authorization: Bearer {{bearerToken}}' \
--header 'Content-Type: application/json' \
--data '{
"name": "My Company",
"email": "aa@gmail.com",
"phone": "+905052128687",
"address1": "Address Test Json 2-1",
"address2": "Address Test Json 2-2",
"cityName": "Manisa",
"cityCode": "45",
"districtName": "Yunusemre",
"countryCode": "TR",
"state": "",
"zip": "45020"
}'
Adres oluşturmadan sonra gelen başarılı istek cevabı aşağıdaki gibidir.
{
"result": true,
"data": {
"id": "76225e42-9436-4643-b691-25c4c9f61dae",
"createdAt": "2021-12-20T09:18:59.925689+03:00",
"updatedAt": "2021-12-20T09:18:59.925689+03:00",
"name": "My Company",
"email": "aa@gmail.com",
"phone": "+905052128687",
"address1": "Address Test Json 2-1",
"address2": "Address Test Json 2-2",
"cityCode": "45",
"cityName": "Manisa",
"city": null,
"state": "",
"zip": "45020",
"districtID": 108600,
"districtName": "Yunusemre",
"district": null,
"streetID": null,
"streetName": "",
"countryCode": "TR",
"countryName": "Turkey",
"source": null,
"isDefaultSenderAddress": false,
"isDefaultReturnAddress": false,
"isActive": true
}
}