Enspace
  1. Items
Enspace
  • Introduction
  • Authentication
  • Concepts
  • First Steps
  • Workspaces
    • Types
      • Fields
        • List Fields
        • Create Field
        • Get Field
        • Field Updated
        • Delete Field
      • Items
        • List Items
          GET
        • Create Item
          POST
        • Count Items
          GET
        • Get Item
          GET
        • Update Item
          PUT
        • Delete item
          DELETE
      • List Types
        GET
      • Count Types
        GET
      • Get specific Type
        GET
      • Create Type
        POST
      • Update Type
        PUT
      • Delete Type
        DELETE
    • Members
      • List Members
      • Count Members
      • Get Member
      • New Member
      • Update Member
      • Remove Member
    • Roles
      • List roles
      • Create role
      • Get specific job title
      • Count positions
      • Update job title
      • Delete role
      • List Role Permissions
      • Add Permission to Role
      • Remove Role Permission
    • Member Groups
      • List groups
      • New group
      • Get group
      • Update group
      • Delete group
      • Add Users
      • Remove Users
    • List Workspaces
      GET
    • Workspace Context
      GET
    • New Workspace
      POST
    • Leave the workspace
      POST
    • Workspace Statistics
      GET
    • Workspace Deletion Preview
      GET
    • Delete Workspace
      DELETE
  • User
    • Audit Logs
    • List API Keys
  1. Items

Update Item

Em desenvolvimento
Develop Env
https://api-develop.enspace.io
Develop Env
https://api-develop.enspace.io
PUT
https://api-develop.enspace.io
/ws/types/{slug}/items/{reference}
Responsável:Julio Cordeiro

Update Item#

Updates the data of an existing item.

Parameters#

slug (path) - Unique slug of the Type
reference (path) - Unique reference of the Item

Request Body#

Only the fields sent will be updated (partial merge).
{
  "data": {
    "price": 3999.99,
    "available": false
  }
}

### Partial Updates#

The system performs an intelligent merge of the data:

Changing Status#

{
  "status": "inactive"
}

Validations#

Required fields cannot be removed
Data types must be respected
Custom field validations are applied

Notes#

The reference cannot be changed
Use PATCH semantics (only sent fields are updated)
Timestamps are updated automatically

Requisição

Authorization
API Key
Adicionar parâmetro em header
x-api-key
Exemplo:
x-api-key: ********************
API Key
Adicionar parâmetro em header
en-workspace
Exemplo:
en-workspace: ********************
or
Parâmetros de Caminho

Parâmetros Header

Parâmetros Bodyapplication/json

Examples

Respostas

🟢200OK
application/json
Item updated.
Body

Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request PUT 'https://api-develop.enspace.io/ws/types/produtos/items/PRO6607F61548C84A7DAF163C747E99A' \
--header 'x-api-key: <api-key>' \
--header 'en-workspace: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "data": {
        "value": 40
    }
}'
Response Response Example
{
    "id": 0,
    "reference": "string",
    "status": "string",
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z",
    "type": {
        "id": 0,
        "name": "string",
        "slug": "string",
        "description": "string",
        "created_at": "2019-08-24T14:15:22Z",
        "updated_at": "2019-08-24T14:15:22Z",
        "fields_count": 0,
        "items_count": 0,
        "config": {}
    },
    "data": {}
}
Página anterior
Get Item
Próxima página
Delete item
Built with