• Share
    • Twitter
    • LinkedIn
    • Facebook
    • Email
  • Feedback
  • Edit
Show / Hide Table of Contents

How to delete a list item

Some tooltip text!
• 1 minute to read
 • 1 minute to read

To delete a list item, use the Lists endpoint. These examples use the Category list for demonstration purposes.

  • RESTful REST API
  • HTTP RPC Agent API
  • WebApi Proxy API
DELETE https://{{env}}.superoffice.com/{{tenant}}/api/v1/List/Category/Items/5 HTTP/1.1
Authorization: Bearer {{token}}
Accept: application/json; charset=utf-8

Response:

HTTP Status 204

For build-in lists use the list name. See example below to use list Id

POST https://{{env}}.superoffice.com/{{tenant}}/api/v1/Agents/List/DeleteFromListName HTTP/1.1
Authorization: Bearer {{token}}
Accept: application/json; charset=utf-8
Content-Type: application/json; charset=utf-8

{
    "UdListDefinitionName": "Category",
    "id": "34"
}

For user-defined lists, use the list ID and list item ID

POST https://{{env}}.superoffice.com/{{tenant}}/api/v1/Agents/List/DeleteFromListDefinition HTTP/1.1
Authorization: Bearer {{token}}
Accept: application/json; charset=utf-8
Content-Type: application/json; charset=utf-8

{
    "UdListDefinitionId": "108",
    "Id": "65"
}

Response:

HTTP Status 204

How to delete a list item using the SuperOffice.WebApi proxy client.

For build-in lists use the list name. See example below to use list Id

var config = new WebApiOptions(tenant.WebApiUrl);
config.Authorization = new AuthorizationAccessToken("8A:Cust12345.Example-Token", OnlineEnvironment.SOD);

var listAgent = new ListAgent(config);
await listAgent.DeleteFromListNameAsync(34, "Category");

For user-defined lists, use the list Id and list item Id

var config = new WebApiOptions(tenant.WebApiUrl);
config.Authorization = new AuthorizationAccessToken("8A:Cust12345.Example-Token", OnlineEnvironment.SOD);

var listAgent = new ListAgent(config);
await listAgent.DeleteFromListDefinitionAsync(65, 108);

Back

In This Article
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top