> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vitau.mx/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Order



## OpenAPI

````yaml GET /api/orders/{id}/
openapi: 3.0.0
info:
  title: Vitau API
  x-logo:
    url: https://vitau-logos.s3.us-west-1.amazonaws.com/profile-logo.png
    backgroundColor: '#FFFFFF'
  version: v2
servers:
  - url: https://api-v2.vitau.mx/
security:
  - APIKeyAuth: []
  - JWTAuth: []
  - CookieAuth: []
paths:
  /api/orders/{id}/:
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
    get:
      tags:
        - api
      operationId: api_orders_read
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PatientOrderRead'
components:
  schemas:
    PatientOrderRead:
      required:
        - details
        - patient
        - payment_references
        - payment_method
        - payment_date
        - shipping_date
        - expected_delivery_date
        - max_delivery_date
        - receiving_date
        - prescriptions
        - shipping_method
        - subtotal
        - shipping_price
        - discount
        - total
      type: object
      properties:
        id:
          title: ID
          type: integer
          readOnly: true
        details:
          type: array
          items:
            $ref: '#/components/schemas/OrderDetailRead'
        patient:
          $ref: '#/components/schemas/PatientRead'
        shipping:
          $ref: '#/components/schemas/Shipping'
        store:
          $ref: '#/components/schemas/Store'
        payment:
          $ref: '#/components/schemas/PaymentRead'
        paypal_agreement:
          $ref: '#/components/schemas/PaypalAgreement'
        payment_references:
          type: array
          items:
            $ref: '#/components/schemas/OtherPayment'
        payment_method:
          $ref: '#/components/schemas/PaymentMethod'
        coupon:
          $ref: '#/components/schemas/CouponRead'
        generated_by:
          $ref: '#/components/schemas/UserRead'
        updated_by:
          $ref: '#/components/schemas/UserRead'
        invoicing:
          $ref: '#/components/schemas/Invoicing'
        payment_date:
          title: Payment date
          type: string
          format: date-time
        shipping_date:
          title: Shipping date
          type: string
          format: date-time
        expected_delivery_date:
          title: Expected delivery date
          type: string
          format: date-time
        max_delivery_date:
          title: Max delivery date
          type: string
          format: date-time
        receiving_date:
          title: Receiving date
          type: string
          format: date-time
        patient_order_status:
          title: Patient order status
          type: string
          readOnly: true
        prescriptions:
          type: array
          items:
            $ref: '#/components/schemas/PrescriptionRead'
        tags:
          title: Tags
          type: string
          readOnly: true
        shipping_method:
          $ref: '#/components/schemas/ShippingMethod'
        created_at:
          title: Created at
          type: string
          format: date-time
          readOnly: true
        updated_at:
          title: Updated at
          type: string
          format: date-time
          readOnly: true
        deleted_at:
          title: Deleted at
          type: string
          format: date-time
          nullable: true
        insurance_refund_status:
          title: Insurance refund status
          type: string
          enum:
            - not_started
            - missing_data
            - sent_to_broker
            - sent_to_insurer
            - approved_by_insurer
        order_status:
          title: Order status
          type: string
          enum:
            - quoted
            - pending_approval
            - approved
            - in_process
            - ready
            - shipped
            - delivered
            - cancelled
            - delayed
            - shortage
        payment_status:
          title: Payment status
          type: string
          enum:
            - unpaid
            - credit
            - paid
            - in_process
            - processing
            - rejected
        rejection_reason:
          title: MP rejection reason
          type: string
          maxLength: 50
        origin:
          title: Origin
          type: string
          maxLength: 20
        subtotal:
          title: Subtotal
          type: string
          format: decimal
        iva:
          title: Iva
          type: string
          format: decimal
        shipping_price:
          title: Shipping price
          type: string
          format: decimal
        shipping_discount:
          title: Temporal shipping discount
          type: string
          format: decimal
          nullable: true
        shipping_cost:
          title: Shipping cost
          type: string
          format: decimal
          nullable: true
        discount:
          title: Order discount
          type: string
          format: decimal
        total:
          title: Total
          type: string
          format: decimal
        folio:
          title: Folio
          type: string
          maxLength: 20
        cfdi:
          title: Facturama's cfdi id
          type: string
          maxLength: 30
        external_payment_id:
          title: External payment id
          type: string
          maxLength: 50
        reminder:
          title: Reminder
          type: integer
          nullable: true
        subscription:
          title: Subscription
          type: integer
          nullable: true
    OrderDetailRead:
      required:
        - product
        - price
        - quantity
        - order
      type: object
      properties:
        id:
          title: ID
          type: integer
          readOnly: true
        product:
          $ref: '#/components/schemas/ProductRead'
        created_at:
          title: Created at
          type: string
          format: date-time
          readOnly: true
        updated_at:
          title: Updated at
          type: string
          format: date-time
          readOnly: true
        price:
          title: Price
          type: string
          format: decimal
        subtotal:
          title: Subtotal
          type: string
          format: decimal
          nullable: true
        total:
          title: Total
          type: string
          format: decimal
          nullable: true
        discount:
          title: Discount
          type: string
          format: decimal
          nullable: true
        iva:
          title: Iva
          type: string
          format: decimal
          nullable: true
        quantity:
          title: Quantity
          type: integer
          maximum: 32767
          minimum: 0
        order:
          title: Order
          type: integer
    PatientRead:
      required:
        - user
        - insurance_carriers
      type: object
      properties:
        id:
          title: ID
          type: integer
          readOnly: true
        user:
          $ref: '#/components/schemas/UserRead'
        referred_by:
          title: Referred by user
          type: integer
          nullable: true
        default_shipping:
          title: The default shipping details
          type: integer
          nullable: true
        default_invoicing:
          title: The default invoicing details
          type: integer
          nullable: true
        preferred_payment:
          title: The preferred payment details
          type: integer
          nullable: true
        insurance_carriers:
          type: array
          items:
            $ref: '#/components/schemas/InsuranceCarrier'
    Shipping:
      required:
        - street
        - exterior_number
        - neighborhood
        - city
        - state
        - country
        - zipcode
        - phone
      type: object
      properties:
        id:
          title: ID
          type: integer
          readOnly: true
        created_at:
          title: Created at
          type: string
          format: date-time
          readOnly: true
        updated_at:
          title: Updated at
          type: string
          format: date-time
          readOnly: true
        name:
          title: Nombre
          type: string
          maxLength: 30
        street:
          title: Street
          type: string
          maxLength: 250
          minLength: 1
        exterior_number:
          title: Exterior number
          type: string
          maxLength: 20
          minLength: 1
        interior_number:
          title: Interior number
          type: string
          maxLength: 20
        neighborhood:
          title: Neighborhood
          type: string
          maxLength: 100
          minLength: 1
        city:
          title: City
          type: string
          maxLength: 100
          minLength: 1
        state:
          title: State
          type: string
          maxLength: 100
          minLength: 1
        country:
          title: Country
          type: string
          maxLength: 100
          minLength: 1
        zipcode:
          title: Zip code
          type: string
          maxLength: 20
          minLength: 1
        phone:
          title: Phone number
          type: string
          maxLength: 25
          minLength: 1
        additional_info:
          title: Additional info
          type: string
        latitude:
          title: Latitude
          type: string
          format: decimal
          nullable: true
        longitude:
          title: Longitude
          type: string
          format: decimal
          nullable: true
        updated_by:
          title: Last user to update shipping
          type: integer
          readOnly: true
    Store:
      required:
        - street
        - exterior_number
        - neighborhood
        - city
        - state
        - country
        - zipcode
        - phone
        - company_name
      type: object
      properties:
        id:
          title: ID
          type: integer
          readOnly: true
        created_at:
          title: Created at
          type: string
          format: date-time
          readOnly: true
        updated_at:
          title: Updated at
          type: string
          format: date-time
          readOnly: true
        name:
          title: Nombre
          type: string
          maxLength: 30
        street:
          title: Street
          type: string
          maxLength: 250
          minLength: 1
        exterior_number:
          title: Exterior number
          type: string
          maxLength: 20
          minLength: 1
        interior_number:
          title: Interior number
          type: string
          maxLength: 20
        neighborhood:
          title: Neighborhood
          type: string
          maxLength: 100
          minLength: 1
        city:
          title: City
          type: string
          maxLength: 100
          minLength: 1
        state:
          title: State
          type: string
          maxLength: 100
          minLength: 1
        country:
          title: Country
          type: string
          maxLength: 100
          minLength: 1
        zipcode:
          title: Zip code
          type: string
          maxLength: 20
          minLength: 1
        phone:
          title: Phone number
          type: string
          maxLength: 25
          minLength: 1
        additional_info:
          title: Additional info
          type: string
        latitude:
          title: Latitude
          type: string
          format: decimal
          nullable: true
        longitude:
          title: Longitude
          type: string
          format: decimal
          nullable: true
        company_name:
          title: Company name
          type: string
          maxLength: 100
          minLength: 1
        business_hours:
          title: Business hours
          type: string
    PaymentRead:
      required:
        - user
        - card_id
      type: object
      properties:
        id:
          title: ID
          type: integer
          readOnly: true
        user:
          title: Card owner
          type: integer
        card_id:
          title: Card id
          type: string
          maxLength: 30
          minLength: 1
        method:
          title: Method
          type: string
          readOnly: true
        name:
          title: Nombre
          type: string
          maxLength: 30
    PaypalAgreement:
      type: object
      properties:
        id:
          title: ID
          type: integer
          readOnly: true
        email:
          title: Dirección de correo electrónico
          type: string
          format: email
          readOnly: true
          minLength: 1
        user:
          title: Billing agreement owner
          type: integer
          readOnly: true
    OtherPayment:
      required:
        - method
        - reference
        - external_url
      type: object
      properties:
        id:
          title: ID
          type: integer
          readOnly: true
        created_at:
          title: Created at
          type: string
          format: date-time
          readOnly: true
        updated_at:
          title: Updated at
          type: string
          format: date-time
          readOnly: true
        method:
          title: Method
          type: string
          maxLength: 20
          minLength: 1
        reference:
          title: Reference
          type: string
          maxLength: 50
          minLength: 1
        institution:
          title: Institution
          type: string
          maxLength: 50
        external_url:
          title: External url
          type: string
          format: uri
          maxLength: 200
          minLength: 1
        order:
          title: Order
          type: integer
          readOnly: true
    PaymentMethod:
      required:
        - fee
        - name
      type: object
      properties:
        id:
          title: ID
          type: integer
          readOnly: true
        fee:
          title: Fee
          type: string
          format: decimal
        created_at:
          title: Created at
          type: string
          format: date-time
          readOnly: true
        updated_at:
          title: Updated at
          type: string
          format: date-time
          readOnly: true
        name:
          title: Nombre
          type: string
          maxLength: 30
          minLength: 1
        fixed_fee:
          title: Fixed
          type: string
          format: decimal
    CouponRead:
      required:
        - code
        - value
      type: object
      properties:
        code:
          title: Code
          type: string
          maxLength: 16
          minLength: 1
        description:
          title: Description
          type: string
          maxLength: 150
        value:
          title: Value
          type: string
          format: decimal
        has_free_shipping:
          title: Has free shipping
          type: boolean
    UserRead:
      required:
        - email
        - first_name
        - last_name
      type: object
      properties:
        id:
          title: ID
          type: integer
          readOnly: true
        patient:
          title: Patient
          type: string
          readOnly: true
        doctor:
          title: Doctor
          type: string
          readOnly: true
        insurance_employee:
          title: Insurance employee
          type: string
          readOnly: true
        country_code:
          title: Country code
          type: string
          readOnly: true
        national_number:
          title: National number
          type: string
          readOnly: true
        date_joined:
          title: Fecha de alta
          type: string
          format: date-time
        created_at:
          title: Created at
          type: string
          format: date-time
          readOnly: true
        updated_at:
          title: Updated at
          type: string
          format: date-time
          readOnly: true
        deleted_at:
          title: Deleted at
          type: string
          format: date-time
          nullable: true
        email:
          title: Dirección de correo electrónico
          type: string
          format: email
          maxLength: 254
          minLength: 1
        phone:
          title: Phone
          type: string
          maxLength: 25
        first_name:
          title: Fist name
          type: string
          maxLength: 30
          minLength: 1
        last_name:
          title: Apellidos
          type: string
          maxLength: 100
          minLength: 1
        second_last_name:
          title: Second last name
          type: string
          maxLength: 100
          nullable: true
        sex:
          title: Sex
          type: string
          enum:
            - M
            - F
        birthdate:
          title: Birthdate
          type: string
          format: date
          nullable: true
        medical_condition:
          title: Medical condition
          type: string
          maxLength: 100
        created_by:
          title: Created by
          type: integer
          nullable: true
        groups:
          description: >-
            Los grupos a los que pertenece este usuario. Un usuario tendrá todos
            los permisos asignados a cada uno de sus grupos.
          type: array
          items:
            title: Grupos
            description: >-
              Los grupos a los que pertenece este usuario. Un usuario tendrá
              todos los permisos asignados a cada uno de sus grupos.
            type: integer
          uniqueItems: true
    Invoicing:
      required:
        - full_name
        - rfc
        - street
        - exterior_number
        - neighborhood
        - city
        - state
        - country
        - zipcode
        - cfdi_use
        - fiscal_regime
      type: object
      properties:
        id:
          title: ID
          type: integer
          readOnly: true
        created_at:
          title: Created at
          type: string
          format: date-time
          readOnly: true
        updated_at:
          title: Updated at
          type: string
          format: date-time
          readOnly: true
        full_name:
          title: Full name
          type: string
          maxLength: 100
          minLength: 1
        rfc:
          title: RFC
          type: string
          maxLength: 20
          minLength: 1
        street:
          title: Street
          type: string
          maxLength: 250
        exterior_number:
          title: Exterior number
          type: string
          maxLength: 20
        neighborhood:
          title: Neighborhood
          type: string
          maxLength: 100
        city:
          title: City
          type: string
          maxLength: 100
        state:
          title: State
          type: string
          maxLength: 100
        country:
          title: Country
          type: string
          maxLength: 100
        zipcode:
          title: Zip code
          type: string
          maxLength: 20
        latitude:
          title: Latitude
          type: string
          format: decimal
          nullable: true
        longitude:
          title: Longitude
          type: string
          format: decimal
          nullable: true
        email:
          title: Dirección de correo electrónico
          type: string
          format: email
          maxLength: 254
        cfdi_use:
          title: CFDI Use
          type: string
          maxLength: 4
        fiscal_regime:
          title: Fiscal Regime
          type: string
          maxLength: 3
        updated_by:
          title: Last user to update invoicing
          type: integer
          readOnly: true
    PrescriptionRead:
      required:
        - issue_date
        - patient
      type: object
      properties:
        id:
          title: ID
          type: integer
          readOnly: true
        document_name:
          title: Document name
          type: string
          readOnly: true
        created_at:
          title: Created at
          type: string
          format: date-time
          readOnly: true
        updated_at:
          title: Updated at
          type: string
          format: date-time
          readOnly: true
        issue_date:
          title: Issue date
          type: string
          format: date
        expiring_date:
          title: Expiring date
          type: string
          format: date
        document:
          title: Document
          type: string
          readOnly: true
          format: uri
        is_verified:
          title: Is verified
          type: boolean
        patient:
          title: Patient
          type: integer
        order:
          title: Order
          type: integer
          nullable: true
        updated_by:
          title: Last user to update prescription
          type: integer
          nullable: true
    ShippingMethod:
      required:
        - company
        - method
      type: object
      properties:
        id:
          title: ID
          type: integer
          readOnly: true
        created_at:
          title: Created at
          type: string
          format: date-time
          readOnly: true
        updated_at:
          title: Updated at
          type: string
          format: date-time
          readOnly: true
        company:
          title: Company
          type: string
          maxLength: 100
          minLength: 1
        method:
          title: Method
          type: string
          enum:
            - standard
            - express
            - local
            - default
        min_delivery_days:
          title: Minimum delivery day
          type: integer
          maximum: 32767
          minimum: 0
          nullable: true
        max_delivery_days:
          title: Maximum delivery day
          type: integer
          maximum: 32767
          minimum: 0
          nullable: true
    ProductRead:
      required:
        - current_supplier
        - supplier_products
        - album
        - product_variants
        - base
        - price
      type: object
      properties:
        id:
          title: ID
          type: integer
          readOnly: true
        current_supplier:
          $ref: '#/components/schemas/SupplierRead'
        cost:
          title: Cost
          type: string
          readOnly: true
        presentation:
          title: Presentation
          type: string
          readOnly: true
        supplier_products:
          type: array
          items:
            $ref: '#/components/schemas/SupplierProductRead'
        album:
          $ref: '#/components/schemas/ImageAlbum'
        product_variants:
          type: array
          items:
            $ref: '#/components/schemas/ProductVariantRead'
        base:
          $ref: '#/components/schemas/BaseProductReadSerializerWithoutProducts'
        created_at:
          title: Created at
          type: string
          format: date-time
          readOnly: true
        updated_at:
          title: Updated at
          type: string
          format: date-time
          readOnly: true
        price:
          title: Price
          type: string
          format: decimal
        has_iva:
          title: Has iva
          type: boolean
        public_price:
          title: Public price
          type: string
          format: decimal
          nullable: true
        average_cost:
          title: Average cost
          type: string
          format: decimal
        is_active:
          title: Is active
          type: boolean
        sat_key:
          title: Sat key
          type: string
          maxLength: 50
          nullable: true
        sat_unit:
          title: Sat unit
          type: string
          maxLength: 100
          nullable: true
        has_shortage:
          title: Has shortage
          type: boolean
        ean_key:
          title: Ean field
          type: string
          maxLength: 50
          nullable: true
        should_calculate_price:
          title: Calculate price
          type: boolean
        enlace_vital_description:
          title: Description for enlace vital discount
          type: string
          maxLength: 10
        active_ingredient:
          title: Active ingredient
          type: string
          maxLength: 250
          nullable: true
        description:
          title: Description
          type: string
          nullable: true
        group_number:
          title: Group number
          type: integer
          maximum: 2147483647
          minimum: 0
          nullable: true
        image:
          title: Image
          type: string
          readOnly: true
          format: uri
          nullable: true
        is_generic:
          title: Is generic
          type: boolean
          nullable: true
        name:
          title: Nombre
          type: string
          maxLength: 250
          nullable: true
        category:
          title: Product's category
          type: integer
          nullable: true
        medical_information:
          title: Product's medical information
          type: integer
          nullable: true
        pharmaceutical_company:
          title: Product's pharmaceutical company
          type: integer
          nullable: true
        variants:
          type: array
          items:
            type: integer
          readOnly: true
          uniqueItems: true
        diseases:
          type: array
          items:
            type: integer
          uniqueItems: true
    InsuranceCarrier:
      required:
        - name
      type: object
      properties:
        id:
          title: ID
          type: integer
          readOnly: true
        created_at:
          title: Created at
          type: string
          format: date-time
          readOnly: true
        updated_at:
          title: Updated at
          type: string
          format: date-time
          readOnly: true
        deleted_at:
          title: Deleted at
          type: string
          format: date-time
          nullable: true
        name:
          title: Nombre
          type: string
          maxLength: 100
          minLength: 1
        patients:
          type: array
          items:
            type: integer
          uniqueItems: true
    SupplierRead:
      required:
        - name
      type: object
      properties:
        id:
          title: ID
          type: integer
          readOnly: true
        created_at:
          title: Created at
          type: string
          format: date-time
          readOnly: true
        updated_at:
          title: Updated at
          type: string
          format: date-time
          readOnly: true
        name:
          title: Nombre
          type: string
          maxLength: 100
          minLength: 1
    SupplierProductRead:
      required:
        - supplier
        - cost
        - product
      type: object
      properties:
        id:
          title: ID
          type: integer
          readOnly: true
        supplier:
          $ref: '#/components/schemas/SupplierRead'
        cost:
          title: Cost
          type: string
          format: decimal
        product:
          title: Product
          type: integer
    ImageAlbum:
      required:
        - images
      type: object
      properties:
        id:
          title: ID
          type: integer
          readOnly: true
        images:
          type: array
          items:
            $ref: '#/components/schemas/Image'
    ProductVariantRead:
      required:
        - variant
        - value
      type: object
      properties:
        id:
          title: ID
          type: integer
          readOnly: true
        variant:
          $ref: '#/components/schemas/Variant'
        value:
          title: Value
          type: string
          maxLength: 50
          minLength: 1
    BaseProductReadSerializerWithoutProducts:
      required:
        - category
        - pharmaceutical_company
        - diseases
        - tags
        - medical_information
        - name
      type: object
      properties:
        id:
          title: ID
          type: integer
          readOnly: true
        category:
          $ref: '#/components/schemas/Category'
        pharmaceutical_company:
          $ref: '#/components/schemas/PharmaceuticalCompany'
        diseases:
          type: array
          items:
            $ref: '#/components/schemas/Disease'
        tags:
          type: array
          items:
            $ref: '#/components/schemas/Tag'
        medical_information:
          $ref: '#/components/schemas/MedicalInformation'
        is_medicine:
          title: Is medicine
          type: string
          readOnly: true
        created_at:
          title: Created at
          type: string
          format: date-time
          readOnly: true
        updated_at:
          title: Updated at
          type: string
          format: date-time
          readOnly: true
        name:
          title: Nombre
          type: string
          maxLength: 250
          minLength: 1
        description:
          title: Description
          type: string
        created_by:
          title: User that created product
          type: integer
          nullable: true
        updated_by:
          title: Last user to update product
          type: integer
          nullable: true
    Image:
      type: object
      properties:
        id:
          title: ID
          type: integer
          readOnly: true
        album:
          title: Album
          type: integer
        image:
          title: Image
          type: string
          readOnly: true
          format: uri
        is_default:
          title: Is default
          type: boolean
    Variant:
      required:
        - name
      type: object
      properties:
        id:
          title: ID
          type: integer
          readOnly: true
        created_at:
          title: Created at
          type: string
          format: date-time
          readOnly: true
        updated_at:
          title: Updated at
          type: string
          format: date-time
          readOnly: true
        name:
          title: Nombre
          type: string
          maxLength: 100
          minLength: 1
    Category:
      required:
        - name
      type: object
      properties:
        id:
          title: ID
          type: integer
          readOnly: true
        created_at:
          title: Created at
          type: string
          format: date-time
          readOnly: true
        updated_at:
          title: Updated at
          type: string
          format: date-time
          readOnly: true
        name:
          title: Nombre
          type: string
          maxLength: 100
          minLength: 1
        parent:
          title: Category's parent
          type: integer
          nullable: true
    PharmaceuticalCompany:
      required:
        - name
      type: object
      properties:
        id:
          title: ID
          type: integer
          readOnly: true
        created_at:
          title: Created at
          type: string
          format: date-time
          readOnly: true
        updated_at:
          title: Updated at
          type: string
          format: date-time
          readOnly: true
        name:
          title: Nombre
          type: string
          maxLength: 100
          minLength: 1
    Disease:
      required:
        - name
      type: object
      properties:
        id:
          title: ID
          type: integer
          readOnly: true
        created_at:
          title: Created at
          type: string
          format: date-time
          readOnly: true
        updated_at:
          title: Updated at
          type: string
          format: date-time
          readOnly: true
        name:
          title: Nombre
          type: string
          maxLength: 250
          minLength: 1
    Tag:
      required:
        - name
      type: object
      properties:
        id:
          title: ID
          type: integer
          readOnly: true
        created_at:
          title: Created at
          type: string
          format: date-time
          readOnly: true
        updated_at:
          title: Updated at
          type: string
          format: date-time
          readOnly: true
        name:
          title: Nombre
          type: string
          maxLength: 250
          minLength: 1
    MedicalInformation:
      type: object
      properties:
        id:
          title: ID
          type: integer
          readOnly: true
        created_at:
          title: Created at
          type: string
          format: date-time
          readOnly: true
        updated_at:
          title: Updated at
          type: string
          format: date-time
          readOnly: true
        active_ingredient:
          title: Active ingredient
          type: string
          maxLength: 250
        is_generic:
          title: Is generic
          type: boolean
        group_number:
          title: Group number
          type: integer
          maximum: 2147483647
          minimum: 0
          nullable: true
        requires_prescription:
          title: Requires prescription
          type: boolean
        base_product:
          title: Medical information for base product
          type: integer
          readOnly: true
  securitySchemes:
    APIKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY
    JWTAuth:
      type: apiKey
      in: header
      name: Bearer
    CookieAuth:
      type: apiKey
      in: header
      name: sessionid

````