Enspace
  1. Items
Enspace
  • Introdução
  • Autenticação
  • Conceitos
  • Primeiros Passos
  • 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
      • Remover membro
    • 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

Create Item

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

Create Item#

Creates a new data instance (item) for a specific Type.

Parameters#

slug (path) - Unique slug of the Type

Request Body#

FieldTypeRequiredDescription
referencestringYesUnique identifier of the item (e.g., "PROD-001")
dataobjectYesObject containing the data based on the Type's fields
statusstringNoItem status (default: "active")

Request Example#

{
  "reference": "PROD-001",
  "data": {
    "name": "iPhone 15",
    "price": 4999.99,
    "category": "electronics",
    "available": true
  }
}

Common Errors#

409 Conflict: Reference already exists
400 Bad Request: Missing required fields or invalid types
404 Not Found: Type not found

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 Bodyapplication/json

Examples

Respostas

🟢200OK
application/json
Item successfully created.
Body

🟠400Invalid request
🟠401Unauthorized
🟠404Record not found
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api-develop.enspace.io/ws/types//items' \
--header 'x-api-key: <api-key>' \
--header 'en-workspace: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "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": {}
}'
Response Response Example
200 - Exemplo 1
Página anterior
List Items
Próxima página
Count Items
Built with