← Volver a la lista de operaciones
Mutación

updateProduct

updateProduct(id: ID!, input: UpdateProductInput!): Product!

Información de la llamada

Punto de acceso

https://api.revclic.com/

Método

POST

Autenticación

Token Bearer (JWT)

Devuelve

Product!

Argumentos

ParámetroTipoValor predeterminadoEstado
idID!Obligatorio
inputUpdateProductInput!Obligatorio

Ejemplo de consulta GraphQL

mutation ExecuteUpdateProduct($id: ID!, $input: UpdateProductInput!) {
  updateProduct(id: $id, input: $input) {
    id
    name { fr es }
    description { fr es }
    price
    pricingType { code label }
    imageUrls
  }
}

Ejemplo de variables

{
  "id": "1",
  "input": {
    "name": {
      "fr": "example",
      "es": "example"
    },
    "description": {
      "fr": "example",
      "es": "example"
    },
    "price": "example",
    "pricingType": "ONE_TIME_PURCHASE",
    "imageUrls": [
      "https://example.com"
    ],
    "url": "https://example.com",
    "originalName": "example",
    "requiresTranslation": true,
    "targetedMarkets": [
      "example"
    ],
    "categoryIds": [
      "1"
    ]
  }
}

Payload JSON completo

{
  "query": "mutation ExecuteUpdateProduct($id: ID!, $input: UpdateProductInput!) {\n  updateProduct(id: $id, input: $input) {\n    id\n    name { fr es }\n    description { fr es }\n    price\n    pricingType { code label }\n    imageUrls\n  }\n}",
  "variables": {
    "id": "1",
    "input": {
      "name": {
        "fr": "example",
        "es": "example"
      },
      "description": {
        "fr": "example",
        "es": "example"
      },
      "price": "example",
      "pricingType": "ONE_TIME_PURCHASE",
      "imageUrls": [
        "https://example.com"
      ],
      "url": "https://example.com",
      "originalName": "example",
      "requiresTranslation": true,
      "targetedMarkets": [
        "example"
      ],
      "categoryIds": [
        "1"
      ]
    }
  }
}

Ejemplo cURL para probar

curl -X POST https://api.revclic.com/ \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <token>" \
  -d '{
  "query": "mutation ExecuteUpdateProduct($id: ID!, $input: UpdateProductInput!) {\n  updateProduct(id: $id, input: $input) {\n    id\n    name { fr es }\n    description { fr es }\n    price\n    pricingType { code label }\n    imageUrls\n  }\n}",
  "variables": {
    "id": "1",
    "input": {
      "name": {
        "fr": "example",
        "es": "example"
      },
      "description": {
        "fr": "example",
        "es": "example"
      },
      "price": "example",
      "pricingType": "ONE_TIME_PURCHASE",
      "imageUrls": [
        "https://example.com"
      ],
      "url": "https://example.com",
      "originalName": "example",
      "requiresTranslation": true,
      "targetedMarkets": [
        "example"
      ],
      "categoryIds": [
        "1"
      ]
    }
  }
}'

Tipos relacionados