Müşteriler

Bu servis aracılığı ile Labs platformu üzerinde yeni müşteri oluşturabilir, oluşturulan müşterilerinizin listesini çekebilir, müşteri bilgilerini güncelleyebilir veya silebilirsiniz.


POST/v1/customers

Müşteri Oluştur

Bu servis aracılığı ile Labs platformunda yeni bir müşteri tanımlaması yapabilirsiniz.

Request

POST
/v1/customers
curl --location --request GET 'https://api.labsoffice.com/v1/customers' \
--header 'Authorization: Bearer {API_TOKEN}'
--header 'Content-Type: application/json' \
--data-raw '{
"fullName": "Sercan Yıldız",
"email": "sercan.yildi3z@labsoffice.com",
"phoneNumber": "5555555555",
"customerSource": "VAGA",
"countryCode": "TR",
"address": {
"addressName": "Ev",
"addressType": [
  "invoice",
  "shipment"
],
"identifier": {
  "customerName": "Sercan Yıldız",
  "phoneNumber": "5555555555",
  "identity": 11111111111
},
"addressDetail": {
  "countryCode": "TR",
  "city": "Giresun",
  "district": "Bulancak",
  "town": "İhsaniye Mh Bahçeli Sk No236 d 131 kat 1",
  "state": null,
  "address": "Bulancak merkez girensun",
  "postalCode": null
},
"isDefault": false,
"company": {
  "companyName": null,
  "taxNumber": null,
  "taxOffice": null
}
}
}'

Response

{
    "status": "success",
    "message": "Müşteri bilgileri başarıyla eklendi.",
    "user": {
        "fullName": "Sercan Yıldız",
        "email": "sercan.yildi3z@labsoffice.com",
        "phoneNumber": "5555555555",
        "id": 1943028,
        "customerSource": "VAGA",
        "address": {
            "userId": 1943028,
            "addressName": "Ev",
            "identifier": {
                "customerName": "Sercan Yıldız",
                "phoneNumber": "5555555555",
                "identity": null
            },
            "addressDetail": {
                "countryCode": "TR",
                "city": "Giresun",
                "district": "Bulancak",
                "town": "İhsaniye Mh Bahçeli Sk No236 d 131 kat 1",
                "state": "",
                "address": "Bulancak merkez girensun",
                "postalCode": ""
            },
            "isDefault": true,
            "company": {
                "companyName": null,
                "taxNumber": null,
                "taxOffice": null
            },
            "updated_at": "2023-12-28T10:31:57.777000Z",
            "created_at": "2023-12-28T10:31:57.777000Z",
            "_id": "658d4e9d0aa5ccb4e003ea5c"
        }
    }
}

GET/v1/customers

Müşteri Listesi

Bu servis aracılığı ile Labs platformunda oluşturduğunuz müşteri listesini çekebilirsiniz.

Request

GET
/v1/customers
curl --location --request GET 'https://api.labsoffice.com/v1/customers?page=1' \
--header 'Authorization: Bearer {API_TOKEN}'

Response

{
    "items": [
        {
            "id": 1858102,
            "fullName": "Gülay türk",
            "email": "234456998_7000037723_0@labsoffice.com",
            "phoneNumber": "55555555555",
            "customerSource": "HEPSIBURADA",
            "address": null
        },
        {
            "id": 1943012,
            "fullName": "Sercan Yıldız",
            "email": "sercan.yildiz@labsoffice.com",
            "phoneNumber": "5555555555",
            "customerSource": "VAGA",
            "address": {
                "_id": "658d4d770aa5ccb4e003ea5b",
                "userId": 1943012,
                "addressName": "Ev",
                "identifier": {
                    "customerName": "Sercan Yıldız",
                    "phoneNumber": "5555555555",
                    "identity": null
                },
                "addressDetail": {
                    "countryCode": "TR",
                    "city": "Giresun",
                    "district": "Bulancak",
                    "town": "İhsaniye Mh Bahçeli Sk No236 d 131 kat 1",
                    "state": "",
                    "address": "Bulancak merkez girensun",
                    "postalCode": ""
                },
                "isDefault": true,
                "company": {
                    "companyName": null,
                    "taxNumber": null,
                    "taxOffice": null
                },
                "updated_at": "2023-12-28T10:27:03.346000Z",
                "created_at": "2023-12-28T10:27:03.346000Z"
            }
        },
        {
            "id": 1943028,
            "fullName": "Sercan Yıldız",
            "email": "sercan.yildi3z@labsoffice.com",
            "phoneNumber": "5555555555",
            "customerSource": "VAGA",
            "address": {
                "_id": "658d4e9d0aa5ccb4e003ea5c",
                "userId": 1943028,
                "addressName": "Ev",
                "identifier": {
                    "customerName": "Sercan Yıldız",
                    "phoneNumber": "5555555555",
                    "identity": null
                },
                "addressDetail": {
                    "countryCode": "TR",
                    "city": "Giresun",
                    "district": "Bulancak",
                    "town": "İhsaniye Mh Bahçeli Sk No236 d 131 kat 1",
                    "state": "",
                    "address": "Bulancak merkez girensun",
                    "postalCode": ""
                },
                "isDefault": true,
                "company": {
                    "companyName": null,
                    "taxNumber": null,
                    "taxOffice": null
                },
                "updated_at": "2023-12-28T10:31:57.777000Z",
                "created_at": "2023-12-28T10:31:57.777000Z"
            }
        }
    ],
    "totalItems": 3,
    "totalPage": 1,
    "currentPage": 1,
    "limit": 25
}

GET/v1/customers/{id}

Müşteri Görüntüle

Bu servis aracılığı ile Labs platformunda kayıtlı müşteri ait bilgileri listeleyebilirsiniz.

Request

GET
/v1/customers/{id}
curl --location --request GET 'https://api.labsoffice.com/v1/customers/2021' \
--header 'Authorization: Bearer {API_TOKEN}'

Response

[
{
            "id": 1943028,
            "fullName": "Sercan Yıldız",
            "email": "sercan.yildi3z@labsoffice.com",
            "phoneNumber": "5555555555",
            "customerSource": "VAGA",
            "address": {
                "_id": "658d4e9d0aa5ccb4e003ea5c",
                "userId": 1943028,
                "addressName": "Ev",
                "identifier": {
                    "customerName": "Sercan Yıldız",
                    "phoneNumber": "05435746878",
                    "identity": null
                },
                "addressDetail": {
                    "countryCode": "TR",
                    "city": "Giresun",
                    "district": "Bulancak",
                    "town": "İhsaniye Mh Bahçeli Sk No236 d 131 kat 1",
                    "state": "",
                    "address": "Bulancak merkez girensun",
                    "postalCode": ""
                },
                "isDefault": true,
                "company": {
                    "companyName": null,
                    "taxNumber": null,
                    "taxOffice": null
                },
                "updated_at": "2023-12-28T10:31:57.777000Z",
                "created_at": "2023-12-28T10:31:57.777000Z"
            }
        }
]

PUT/v1/customers/{id}

Müşteri Güncelle

Bu servis aracılığı ile Labs platformundaki mevcut müşteri bilgilerinizi güncelleyebilirsiniz.

Metod yapım aşamasında.


DELETE/v1/customers/{id}

Müşteri Sil

Bu servis aracılığı ile Labs platformundaki mevcut müşteri bilgilerinizi silebilirsiniz.

Request

DELETE
/v1/customers/{id}
curl --location --request DELETE 'https://api.labsoffice.com/v1/customers/2021' \
--header 'Authorization: Bearer {API_TOKEN}'
--header 'Content-Type: application/json' \

Response

{
    "status": "success",
    "message": "Müşteri silme işlemi başarılı"
}