Skip to content

🗃️​ Get orders by user and vertical

El objetivo de este endpoint es poder recuperar los pedidos de un usuario específico filtrados por vertical.

GET
api/order/get-user-order-by-vertical

Este endpoint permite recuperar los pedidos de un usuario filtrados por vertical utilizando únicamente el token de autenticación.

Se requiere que el usuario esté autenticado y tenga los permisos necesarios para acceder a los pedidos, por lo que es de vital importancia que se proporcione un token de autenticación válido en la cabecera de la solicitud.

  • token
    • Tipo: string
    • Título de la cabecera: Authorization
    • Ejemplo: Bearer <token>
    Token ilustrativo:
    Bearer eyJhbGciOcCI6IkpXVCJ9.eyJpZCI6MiwiZW1haWwiOiJwWViYTEuY29tIiwidmVydGljYWwiOiJQaiOjE3NTM4MTM4NzMsImV4cCI6MTc1NjQwNTg3M30.xg0PkSBddaWVHrr9NqNZEHbWHYqJYVjo

A continuación se presentan los casos de uso de éxito y error para este endpoint:

  • Respuesta exitosa: El endpoint devuelve un código de estado HTTP 200 y un arreglo de objetos JSON que contiene los pedidos del usuario filtrados por vertical.

    200 OK
    [
    {
    "id": 1,
    "documentId": "jdh0uw771gfpvav0loghq1mi",
    "numberOrder": "1",
    "paymentStripeID": null,
    "clientID": null,
    "email": "prueba3@prueba3.com",
    "stateOrder": "complete",
    "statePayment": null,
    "methodPayment": null,
    "stripeCrm": "Inspiria",
    "vertical": "Cirugía",
    "totalPrice": null,
    "date": "2025-07-31T20:30:00.000Z",
    "stripeFee": null,
    "stripeNet": null,
    "products": [
    {
    "id": 1,
    "productID": null,
    "title": null,
    "priceProduct": null,
    "quantity": 0,
    "purchasePrice": null,
    "discount": null,
    "SKU": null,
    "subscriptionProduct": null,
    "type": null,
    "acronym": null,
    "couponApplied": false,
    "laabConnection": {
    "id": 1,
    "groupLaabID": null,
    "courseLaabID": null
    },
    "dateValidation": {
    "id": 1,
    "existsDate": false,
    "startingDate": null
    },
    "contract": {
    "id": 1,
    "existsContract": false,
    "contractSignature": false
    },
    "productTaxes": {
    "id": 1,
    "percentage": null,
    "quantity": null,
    "invoiceText": null,
    "booksID": null,
    "woPriceIVA": null
    },
    "product": {
    "id": 9,
    "documentId": "ocrbh8xqsmdrsywx0bfzu868",
    "title": "Ñoño",
    "isSoon": false,
    "stripeID": null,
    "SKU": "789qw",
    "type": "Congreso",
    "image": {
    "id": 1,
    "documentId": "y4hqg151ojczvopvuxew1oor",
    "name": "Icono de Huevo.png",
    "alternativeText": null,
    "caption": null,
    "width": 512,
    "height": 512,
    "formats": {
    "small": {
    "ext": ".png",
    "url": "/uploads/small_Icono_de_Huevo_93e6eb0594.png",
    "hash": "small_Icono_de_Huevo_93e6eb0594",
    "mime": "image/png",
    "name": "small_Icono de Huevo.png",
    "path": null,
    "size": 21.74,
    "width": 500,
    "height": 500,
    "sizeInBytes": 21740
    },
    "thumbnail": {
    "ext": ".png",
    "url": "/uploads/thumbnail_Icono_de_Huevo_93e6eb0594.png",
    "hash": "thumbnail_Icono_de_Huevo_93e6eb0594",
    "mime": "image/png",
    "name": "thumbnail_Icono de Huevo.png",
    "path": null,
    "size": 5.54,
    "width": 156,
    "height": 156,
    "sizeInBytes": 5535
    }
    },
    "hash": "Icono_de_Huevo_93e6eb0594",
    "ext": ".png",
    "mime": "image/png",
    "size": 5.07,
    "url": "/uploads/Icono_de_Huevo_93e6eb0594.png",
    "previewUrl": null,
    "provider": "local",
    "provider_metadata": null,
    "folderPath": "/",
    "createdAt": "2025-07-15T15:25:57.421Z",
    "updatedAt": "2025-07-15T15:25:57.421Z",
    "publishedAt": "2025-07-15T15:25:57.422Z",
    "locale": null,
    "isUrlSigned": false
    },
    "price": {
    "id": 9,
    "price": 24,
    "discountPercentage": null,
    "tax": "Sin impuesto",
    "template": "Compra consultiva",
    "untaxedPrice": null
    },
    "header": {
    "id": 3,
    "modality": "Presencial"
    },
    "categories": [],
    "experts": [
    {
    "id": 1,
    "documentId": "egyf7o0wd4vn2mi4knaj65a5",
    "name": "Juan"
    }
    ],
    "partners": [
    {
    "id": 1,
    "documentId": "mp7e8jz4zl7zhyc24yqdjr85",
    "slug": "kevin",
    "image": {
    "id": 1,
    "documentId": "y4hqg151ojczvopvuxew1oor",
    "name": "Icono de Huevo.png",
    "alternativeText": null,
    "caption": null,
    "width": 512,
    "height": 512,
    "formats": {
    "small": {
    "ext": ".png",
    "url": "/uploads/small_Icono_de_Huevo_93e6eb0594.png",
    "hash": "small_Icono_de_Huevo_93e6eb0594",
    "mime": "image/png",
    "name": "small_Icono de Huevo.png",
    "path": null,
    "size": 21.74,
    "width": 500,
    "height": 500,
    "sizeInBytes": 21740
    },
    "thumbnail": {
    "ext": ".png",
    "url": "/uploads/thumbnail_Icono_de_Huevo_93e6eb0594.png",
    "hash": "thumbnail_Icono_de_Huevo_93e6eb0594",
    "mime": "image/png",
    "name": "thumbnail_Icono de Huevo.png",
    "path": null,
    "size": 5.54,
    "width": 156,
    "height": 156,
    "sizeInBytes": 5535
    }
    },
    "hash": "Icono_de_Huevo_93e6eb0594",
    "ext": ".png",
    "mime": "image/png",
    "size": 5.07,
    "url": "/uploads/Icono_de_Huevo_93e6eb0594.png",
    "previewUrl": null,
    "provider": "local",
    "provider_metadata": null,
    "folderPath": "/",
    "createdAt": "2025-07-15T15:25:57.421Z",
    "updatedAt": "2025-07-15T15:25:57.421Z",
    "publishedAt": "2025-07-15T15:25:57.422Z",
    "locale": null,
    "isUrlSigned": false
    }
    }
    ],
    "cardTags": {
    "id": 5,
    "rightTag": "asdsdfhgdfhdfh",
    "leftTag": "asdasdasfs"
    }
    }
    }
    ]
    }
    ]
  • NotFoundError: Este error indica que no se encontraron pedidos para el usuario en la vertical especificada.
    404 Not Found
    {
    "data": null,
    "error": {
    "status": 404,
    "name": "NotFoundError",
    "message": "No orders found for this user",
    "details": {}
    }
    }