VitrinaAPI

Posts de Instagram

Prepara el post de Instagram de un vehículo (pie de foto escrito con el estilo de la automotora y las primeras fotos) y apruébalo para publicarlo o programarlo. Nada se publica sin la aprobación.

Beta
Puede cambiar en cualquier momento, con una entrada en el changelog y aviso a quienes la llamaron recientemente — ver versionado.

Descarga la proyección completa de la API pública: openapi.json.

MétodoRutaQué hace
POST/instagram-posts/{id}/approveApprove and publish (or schedule) a prepared Instagram post
POST/instagram-posts/vehicles/{vehicleId}/draftsPrepare an Instagram post for one-click approval

POST /instagram-posts/{id}/approve

Approve and publish (or schedule) a prepared Instagram post

Publishes a pending_approval post, optionally with an edited caption / photo selection, or schedules it when scheduled_at is present. Like the compose POST, a publish that Instagram refuses answers 200 with status: "failed" and the reason — branch on status. 409 when the post is no longer waiting for approval.

ParámetroEnTipoObligatorioRestricciones
idpathuuidsí

Cuerpo

CampoTipoObligatorioRestricciones
photosobject[]—
captionstring—máx. 2200
scheduled_atstring—date-time
curl -X POST https://api.vitrinadev.com/api/v1/instagram-posts/<id>/approve \
  -H "Authorization: Bearer $VITRINA_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "caption": "⚡️Se vende! Toyota RAV4 Híbrido 2022\n\n$24.990.000\n\n- Automática\n- 38.000 km\n\nEscríbenos por DM.",
    "scheduled_at": "2026-10-16T13:00:00.000Z"
  }'

Ejemplo de respuesta (200)

{
  "data": {
    "id": "1a5ea0c1-0000-4000-8000-000000000001",
    "vehicle_id": "c4c4c4c4-0000-4000-8000-000000000001",
    "status": "scheduled",
    "caption": "⚡️Se vende! Toyota RAV4 Híbrido 2022\n\n$24.990.000\n\n- Automática\n- 38.000 km\n\nEscríbenos por DM.",
    "photos": [
      {
        "photo_index": 0,
        "crop": null,
        "resolved_url": "https://cdn.vitrinadev.com/vehicles/rav4-1.jpg"
      },
      {
        "photo_index": 1,
        "crop": null,
        "resolved_url": "https://cdn.vitrinadev.com/vehicles/rav4-2.jpg"
      }
    ],
    "scheduled_at": "2026-10-16T13:00:00.000Z",
    "published_at": null,
    "published_media_id": null,
    "messaging_account_id": null,
    "error": null,
    "created_by": "5e5e5e5e-0000-4000-8000-000000000001",
    "created_at": "2026-10-15T14:00:00.000Z",
    "updated_at": "2026-10-15T14:02:10.000Z"
  }
}

Responde: 200 · 400 · 401 · 403 · 404 · 409 · 429

POST /instagram-posts/vehicles/{vehicleId}/drafts

Prepare an Instagram post for one-click approval

What choosing Instagram in a vehicle's "Publicar" step does: prepares a post in pending_approval (server-generated caption, the first 10 photos of the gallery) and publishes NOTHING. 201 when created; 200 with the existing post when the vehicle already has one waiting. 422 when the vehicle has no photos or no Instagram account is connected.

ParámetroEnTipoObligatorioRestricciones
vehicleIdpathuuidsí
curl -X POST https://api.vitrinadev.com/api/v1/instagram-posts/vehicles/<id>/drafts \
  -H "Authorization: Bearer $VITRINA_KEY"

Ejemplo de respuesta (201)

{
  "data": {
    "id": "1a5ea0c1-0000-4000-8000-000000000001",
    "vehicle_id": "c4c4c4c4-0000-4000-8000-000000000001",
    "status": "pending_approval",
    "caption": "⚡️Se vende! Toyota RAV4 Híbrido 2022\n\n$24.990.000\n\n- Automática\n- 38.000 km\n\nEscríbenos por DM.",
    "photos": [
      {
        "photo_index": 0,
        "crop": null,
        "resolved_url": "https://cdn.vitrinadev.com/vehicles/rav4-1.jpg"
      },
      {
        "photo_index": 1,
        "crop": null,
        "resolved_url": "https://cdn.vitrinadev.com/vehicles/rav4-2.jpg"
      }
    ],
    "scheduled_at": null,
    "published_at": null,
    "published_media_id": null,
    "messaging_account_id": null,
    "error": null,
    "created_by": "5e5e5e5e-0000-4000-8000-000000000001",
    "created_at": "2026-10-15T14:00:00.000Z",
    "updated_at": "2026-10-15T14:00:00.000Z"
  }
}

Responde: 200 · 201 · 400 · 401 · 403 · 404 · 409 · 429

En esta página