İçeriğe geç

Yeni Adres Oluştur

POST /v1/addresses/0

Gönderici (sender) veya alıcı (receiver) olarak sisteme yeni bir kargo adresi ekler.

ParametreKonumTipAçıklamaVarsayılanÖrnek
Authorization * headerstringBearer Yetkilendirme Tokeni (Örn: Bearer eyJhb...)-Bearer <TOKEN>
USER_ID * pathstringİşlem yapan kullanıcının kimlik (ID) değeri. UUID formatındadır.--
Alan Tip Açıklama
type string Adresin türü ('sender' veya 'receiver')
title string Kullanıcının anlayacağı adres başlığı (Örn: 'Evim', 'Merkez Depo')
location object
by object Teslimatta sorumlu kişinin iletişim verisi
others object
{
"type":"receiver",
"title":"deneme adresi 24",
"location":{
"country":{
"id":"298795",
"title":"Türkiye",
"code":"tr"
},
"province":{
"id":"",
"title":"",
"code":""
},
"city":{
"id":"0",
"title":"Samsun",
"code":""
},
"district":{
"id":"0",
"title":"Çarşamba",
"code":""
},
"neighborhood":{
"id":"0",
"title":"",
"code":""
},
"street":{
"id":"0",
"title":"",
"code":""
},
"address":{
"line1":"2010 sitesi 1",
"line2":"2010 sitesi 2",
"line3":"2010 sitesi 3"
},
"postCode":""
},
"by":{
"entity":"Yusuf Yasir Kaygusuz",
"phone1":{
"phoneCountryCode":"90",
"number":"5413234321"
},
"phone2":{
"phoneCountryCode":"90",
"number":"5413234322"
},
"phone3":{
"phoneCountryCode":"90",
"number":"5413234323"
},
"email":"yasirkaygusuzone@hotmail.com"
},
//"invoice":{
// "eInvoice":false,
// "taxDepartment":"",
// "taxNumber":""
//},
"others":{
// "tag":"",
// "isActive":"false",
// "latitude":0.1233213,
// "longitude":0.1233213
}
}
fetch('https://api.kargomucuz.com/v1/addresses/0', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer <YOUR_TOKEN>'
},
body: JSON.stringify({
"type":"receiver",
"title":"deneme adresi 24",
"location":{
"country":{
"id":"298795",
"title":"Türkiye",
"code":"tr"
},
"province":{
"id":"",
"title":"",
"code":""
},
"city":{
"id":"0",
"title":"Samsun",
"code":""
},
"district":{
"id":"0",
"title":"Çarşamba",
"code":""
},
"neighborhood":{
"id":"0",
"title":"",
"code":""
},
"street":{
"id":"0",
"title":"",
"code":""
},
"address":{
"line1":"2010 sitesi 1",
"line2":"2010 sitesi 2",
"line3":"2010 sitesi 3"
},
"postCode":""
},
"by":{
"entity":"Yusuf Yasir Kaygusuz",
"phone1":{
"phoneCountryCode":"90",
"number":"5413234321"
},
"phone2":{
"phoneCountryCode":"90",
"number":"5413234322"
},
"phone3":{
"phoneCountryCode":"90",
"number":"5413234323"
},
"email":"yasirkaygusuzone@hotmail.com"
},
//"invoice":{
// "eInvoice":false,
// "taxDepartment":"",
// "taxNumber":""
//},
"others":{
// "tag":"",
// "isActive":"false",
// "latitude":0.1233213,
// "longitude":0.1233213
}
})
})
.then(response => response.json())
.then(data => console.log(data));
200: Başarılı kimlik doğrulaması sonrası dönen yanıt.
{
"status": true,
"message": "Adres oluşturma başarılı.",
"payload": {
"data": {
"resellerId": null,
"type": "receiver",
"title": "Sender Adresim Example",
"explanation": null,
"location": {
"country": {
"id": "298795",
"title": "Türkiye",
"code": null
},
"province": {
"id": "",
"title": "",
"code": ""
},
"city": {
"id": "55",
"title": "Samsun",
"code": null
},
"district": {
"id": "55003",
"title": "Çarşamba",
"code": null
},
"neighborhood": {
"id": null,
"title": null,
"code": null
},
"street": {
"id": null,
"title": null,
"code": null
},
"address": {
"line1": "2010 sitesi 1",
"line2": null,
"line3": null
},
"postCode": ""
},
"by": {
"entity": "Yusuf Yasir Kaygusuz",
"phone1": {
"phoneCountryCode": "90",
"number": "5419441858"
},
"phone2": {
"phoneCountryCode": null,
"number": null
},
"phone3": {
"phoneCountryCode": null,
"number": null
},
"email": "yasirkaygusuzone@hotmail.com"
},
"others": {
"tag": null,
"latitude": null,
"longitude": null,
"isActive": false,
"updated": "2026-06-09T12:47:04.778Z",
"created": "2026-06-09T12:47:04.778Z"
},
"_id": "6a280b481391689d3a486d37",
"__v": 0
}
},
"code": 500
}