General
BaseUrl:
-
Staging: https://staging.api.b2b.octovan.com
-
Production: https://prod.api.b2b.octovan.com
Important
|
Erişim için Basic Authentication bilgileri gönderilmelidir.Erişim bilgileri için teknik ekibimiz ile iletişime geçiniz. |
Create Shipment
Octovan sisteminde teslimat oluşturmak için kullanılması gereken servis.
POST /merchant/api/shipments HTTP/1.1
Content-Type: application/json
Authorization: Basic Auth
{
"orderNumber" : "123",
"deliveryType" : "OUTBOUND",
"packageDetail" : {
"totalDeci" : null,
"boxQuantity" : null,
"products" : [ {
"quantity" : 1,
"name" : "Koltuk",
"categoryName" : "Mobilya"
} ]
},
"sender" : {
"id" : null,
"name" : "ahmet",
"phoneNumber" : "5555555555",
"address" : {
"countryCode" : "TR",
"city" : "ISTANBUL",
"town" : "KADIKÖY",
"district" : "Feneryolu",
"address" : "feneryolu mah. no:33 kadıköy",
"zipCode" : "34472"
}
},
"receiver" : {
"id" : null,
"name" : "ahmet",
"phoneNumber" : "5555555555",
"address" : {
"countryCode" : "TR",
"city" : "ISTANBUL",
"town" : "KADIKÖY",
"district" : "Feneryolu",
"address" : "feneryolu mah. no:33 kadıköy",
"zipCode" : "34472"
}
}
}
Detail
Field | Type | Description |
---|---|---|
deliveryType |
Enum NOTNULL |
Bu alanda teslimata ait tip bilgisi iletilir. *OUTBOUND: Bir siparişe ait satışı ifade eder. *INBOUND: İade teslimatını ifade eder. |
orderNumber |
String NOTNULL |
Octovan teslimat sistemini kullanan sistem üzerindeki teslimat numarası |
packageDetail |
Object |
Paket detay bilgisini içeren obje |
sender |
Object |
Gönderici bilgilerini içieren obje |
receiver |
Object |
Alıcı bilgilerini içieren obje |
Field | Type | Description |
---|---|---|
boxQuantity |
integer |
Paket adet bilgisi |
totalDeci |
Double |
Toplam paket desi bilgisi |
products |
array |
Teslimata ait ürün bilgisi |
product.quantity |
integer NOTNULL |
Ürün adet bilgisi |
product.name |
String NOTNULL |
Ürün isim bilgisi |
product.categoryName |
String NOTNULL |
Ürün kategori bilgisi |
Field | Type | Description |
---|---|---|
id |
String |
Kullanıcı sistem üzerinde var ise gönderici id |
name |
String NOTNULL |
Gönderici isim bilgisi |
phoneNumber |
String NOTNULL |
Gönderici telefon bilgisi (başında 0 olmadan 5111111111 şeklinde gönderilmelidir) |
address |
Object |
Gönderici adres bilgisi |
address.countryCode |
String |
Gönderici adres ülke bilgisi. örnek: “TR” |
address.city |
String NOTNULL |
Gönderici adres şehir bilgisi. |
address.town |
String NOTNULL |
Gönderici adres ilçe bilgisi. |
address.district |
String |
Gönderici adres mahalle bilgisi. |
address.address |
String NOTNULL |
Gönderici adres açık adres bilgisi. |
address.zipcode |
String |
Gönderici adres posta kodu bilgisi. |
Field | Type | Description |
---|---|---|
id |
String |
Kullanıcı sistem üzerinde var ise alıcı id |
name |
String NOTNULL |
Alıcı isim bilgisi |
phoneNumber |
String NOTNULL |
Alıcı telefon bilgisi (başında 0 olmadan 5111111111 şeklinde gönderilmelidir) |
address |
Object |
Alıcı adres bilgisi |
address.countryCode |
String |
Alıcı adres ülke bilgisi. örnek: “TR” |
address.city |
String NOTNULL |
Alıcı adres şehir bilgisi. |
address.town |
String NOTNULL |
Alıcı adres ilçe bilgisi. |
address.district |
String |
Alıcı adres mahalle bilgisi. |
address.address |
String NOTNULL |
Alıcı adres açık adres bilgisi. |
address.zipcode |
String |
Alıcı adres posta kodu bilgisi. |
Important
|
Şehir ve ilçe bilgileri Octovan teslimat sisteminde kayıtlı bilgiler ile uyuşmalıdır. Şehir ve ilçe bilgileri |
HTTP/1.1 200 OK
Content-Type: application/json
{
"data" : {
"id" : 1,
"barcodes" : [ {
"barcode" : "^XA^CI28^CF0,60^FO50,50^FDDT300 1/2^FS^CF0,30^FO50,115^FDOCTOVAN Esentepe, Talatpasa Cad^FS^FO50,155^FD5/1, 34394^FS^FO50,195^FDŞisli/Istanbul, Türkiye^FS^FO50,240^GB700,3,3^FS^CF0,30^FO50,280^FDqweqwe^FS^FO50,320^FD5384407661^FS^FO50,360^FD^FS^CF0,60^FO50,400^FDHARMANCIK^FS^CF0,30^FO50,460^FDBURSA^FS^FO50,500^FDqweqweqw^FS^FO50,540^FD^FS^FO50,580^FD^FS^CF0,15^FO50,620^GB700,3,3^FS^BY4,2,270^FO50,660^BC^FDDT000244^FS^XZ",
"type" : "ZPL"
} ]
},
"error" : null
}
Note
|
Güncelleme ve iptal için başarılı cevap içerisinde iletilen id parametresi kullanılmalıdır. |
Update Shipment
Octovan sisteminde teslimat güncellemek için kullanılması gereken servis.
PUT /merchant/api/shipments/1 HTTP/1.1
Content-Type: application/json
Authorization: Basic Auth
{
"packageDetail" : {
"totalDeci" : 40.0,
"boxQuantity" : 1,
"products" : [ {
"quantity" : 1,
"name" : "Koltuk",
"categoryName" : "Mobilya"
} ]
},
"receiver" : {
"id" : null,
"name" : null,
"phoneNumber" : null,
"address" : {
"countryCode" : "TR",
"city" : "ISTANBUL",
"town" : "KADIKÖY",
"district" : "Feneryolu",
"address" : "feneryolu mah. no:33 kadıköy",
"zipCode" : "34472"
}
},
"operationType" : "ADDRESS"
}
Detail
-
Teslimat oluşturma modelde yer alan receiver bilgileri güncelleneceği durumda "operationType": "ADDRESS" olarak güncelleme servisi kullanılmalıdır.
-
Teslimat oluşturma modelde yer alan packageDetail bilgileri güncelleneceği durumda "operationType": "PRODUCT" olarak güncelleme servisi kullanılmalıdır.
Note
|
İş sadece ilk oluşturulduğu adımda (CREATED) güncellenebilir. |
Field | Type | Description |
---|---|---|
operationType |
String |
İşlem türü ADDRESS/PRODUCT |
packageDetail |
Object |
Paket detay bilgileri |
receiver |
Object |
Alıcı bilgileri |
Field | Type | Description |
---|---|---|
boxQuantity |
integer |
Paket adet bilgisi |
totalDeci |
Double |
Toplam paket desi bilgisi |
products |
array |
Teslimata ait ürün bilgisi |
product.quantity |
integer NOTNULL |
Ürün adet bilgisi |
product.name |
String NOTNULL |
Ürün isim bilgisi |
product.categoryName |
String NOTNULL |
Ürün kategori bilgisi |
Field | Type | Description |
---|---|---|
id |
String |
Kullanıcı sistem üzerinde var ise alıcı id |
name |
String NOTNULL |
Alıcı isim bilgisi |
phoneNumber |
String NOTNULL |
Alıcı telefon bilgisi (başında 0 olmadan 5111111111 şeklinde gönderilmelidir) |
address |
Object |
Alıcı adres bilgisi |
address.countryCode |
String |
Alıcı adres ülke bilgisi. örnek: “TR” |
address.city |
String NOTNULL |
Alıcı adres şehir bilgisi. |
address.town |
String NOTNULL |
Alıcı adres ilçe bilgisi. |
address.district |
String |
Alıcı adres mahalle bilgisi. |
address.address |
String NOTNULL |
Alıcı adres açık adres bilgisi. |
address.zipcode |
String |
Alıcı adres posta kodu bilgisi. |
HTTP/1.1 200 OK
Content-Type: application/json
{
"data" : {
"success" : true
},
"error" : null
}
Cancel Shipment
Octovan sisteminde teslimat iptal etmek için kullanılması gereken servis.
DELETE /merchant/api/shipments/1 HTTP/1.1
Content-Type: application/json
Authorization: Basic Auth
{
"cancelReason" : "CancelReason"
}
Field | Type | Description |
---|---|---|
cancelReason |
String |
İptal sebep bilgisi |
HTTP/1.1 200 OK
Content-Type: application/json
{
"data" : {
"success" : true
},
"error" : null
}
Error Response
HTTP/1.1 400 Bad Request
Content-Type: application/json
{
"data" : null,
"error" : {
"status" : 400,
"errors" : [ {
"resultCode" : 100,
"type" : "VALIDATION_ERROR",
"detail" : "cancel reason is mandatory."
} ]
}
}
Error Types
Taboda belirtilmeyen hatalar için HTTP statü kodları standartlarına uyulmuştur.
HTTP Status | Result Code | Description |
---|---|---|
200 |
Başarılı |
|
400 |
100 |
Zorunlu alan boş bırakıldığında iletilen hata. |
400 |
101 |
Belirli enum değerleri dışında değer iletilen isteğe dönülen hata. |
400 |
102 |
Yanlış veri tipi iletildiğinde dönülen hata. Örn: integer alana string gönderilmesi. |
400 |
104 |
Adres şehir veya ilçe bilgisinin geçersiz girilmesi sonucu dönülen hata. |