Vervang Item

Vervang Item #

Vervangt een bestaand directory-item.

PUT /v1.0/contactdirectories/{DIRECTORY_ID}/items/{DIRECTORY_ITEM_ID}

Voorbeeld #

Dit verzoek zal een bestaand directory-item bijwerken.

Verzoek #

PUT https://api.na.myreports.cloud/api/v1.0/contactdirectories/00000000-0000-0000-0000-000000000000/items/00000000-0000-0000-0000-000000000123 HTTP/1.1
Content-Type: application/json
accept-charges: true
Authorization: Bearer {TOKEN}
Connection: keep-alive
{
    "fields": {
        "title": "Mr",
        "fullName": "CRM3a",
        "companyName": "Company",
        "jobTitle": "Job Title",
        "phone1": "+44XXXXXXXXXX",
        "email": "Email Address",
        "field1": "field1",
        "field2": "field2",
        "crmId": "00000000-0000-0000-0000-000000000001"
    }
}

Reactie #

HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8
Content-Length: xx
Location: https://api.na.myreports.cloud/api/v1.0/contactdirectories/00000000-0000-0000-0000-000000000000/items/00000000-0000-0000-0000-000000000123
{
	"data": {
        "id": "00000000-0000-0000-0000-000000000123",
        "fields": {
            "title": "Mr",
            "fullName": "CRM3a",
            "companyName": "Company",
            "jobTitle": "Job Title",
            "phone1": "+44XXXXXXXXXX",
            "email": "Email Address",
            "field1": "field1",
            "field2": "field2",
            "crmId": "00000000-0000-0000-0000-000000000001"
        }
    },
	"status": "success",
	"timestamp": "2019-11-29T16:03:23.9251680Z"
}

Fouten #

Ongeautoriseerd #

Wanneer het token niet wordt verstrekt, ongeldig is of verlopen

HTTP/1.1 401 Unauthorized

Slecht verzoek #

Wanneer het gegeven mapitem-id niet in het juiste formaat is

HTTP/1.1 400 Bad Request
Date: Thu, 06 Feb 2020 12:45:27 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 149
{
	"error": 400,
	"message": "The value '<tenant id>' is not valid.",
	"status": "error",
	"timestamp": "2020-02-06T12:45:27.5903465Z"
}

Niet gevonden #

Wanneer er geen directory-items zijn met een overeenkomend id

HTTP/1.1 404 Not Found
Date: Thu, 06 Feb 2020 12:46:58 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 95
{
	"error": 404,
	"message": "Not Found",
	"status": "error",
	"timestamp": "2020-02-06T12:46:58.7669535Z"
}

Functies kunnen variëren afhankelijk van uw licentie en communicatieplatform. Neem contact op met uw provider voor details.