Elimina CRM Elemento

Elimina CRM Elemento #

Elimina un elemento esistente da una directory.

Richiesta #

DELETE /v1.0/contactdirectory/{DIRECTORY_ID}/crmitems/{CRM_ID}

Esempio #

Questa richiesta eliminerà l'elemento specifico all'interno della directory.

Richiesta #

DELETE https://api.na.myreports.cloud/api/v1.0/contactdirectories/00000000-0000-0000-0000-000000000000/crmitems/00000000-0000-0000-0000-000000000001 HTTP/1.1
Authorization: Bearer {TOKEN}

Risposta #

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: xx
{ 
	"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-01-01T10:00:00.2890319Z"
}

Errori #

Non autorizzato #

Quando il token non viene fornito, invalido o scaduto

HTTP/1.1 401 Unauthorized

Richiesta Sbagliata (1) #

Quando l'id della directory fornito non è nel formato corretto

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 '<directory id>' is not valid.",
	"status":"error",
	"timestamp":"2020-02-06T12:45:27.5903465Z"
}

Richiesta cattiva (2) #

Quando l'elemento della directory fornito, il crmId non è nel formato corretto

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 '<crm id>' is not valid.",
	"status":"error",
	"timestamp":"2020-02-06T12:45:27.5903465Z"
}

Non trovato #

Quando non ci sono elementi di cartella con un ID corrispondente.

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"
}

Le funzioni possono variare a seconda della licenza e della piattaforma di comunicazione. Contattare il provider per i dettagli.