> ## 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.

# Request Invoice



## OpenAPI

````yaml PATCH /api/orders/{id}/request-invoice/
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}/request-invoice/:
    parameters:
      - name: id
        in: path
        description: A unique integer value identifying this order.
        required: true
        schema:
          type: integer
    patch:
      tags:
        - api
      operationId: api_orders_request_invoice
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Invoicing'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PatientOrderWrite'
components:
  schemas:
    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
    PatientOrderWrite:
      required:
        - details
        - patient
        - payment_method
      type: object
      properties:
        id:
          title: ID
          type: integer
          readOnly: true
        details:
          type: array
          items:
            $ref: '#/components/schemas/OrderDetailWrite'
        patient:
          title: Patient
          type: integer
        shipping:
          title: Shipping
          type: integer
          nullable: true
        store:
          title: Store
          type: integer
          nullable: true
        payment:
          title: Payment
          type: integer
          nullable: true
        paypal_agreement:
          title: Paypal agreement
          type: integer
        payment_method:
          title: Payment method
          type: integer
        invoicing:
          title: Invoicing
          type: integer
          nullable: true
        coupon:
          title: Coupon
          type: string
          maxLength: 16
          minLength: 1
        shipping_method:
          title: Shipping method
          type: integer
        prescriptions:
          type: array
          items:
            $ref: '#/components/schemas/PrescriptionWrite'
        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
          readOnly: true
        payment_status:
          title: Payment status
          type: string
          enum:
            - unpaid
            - credit
            - paid
            - in_process
            - processing
            - rejected
        rejection_reason:
          title: MP rejection reason
          type: string
          readOnly: true
          minLength: 1
        origin:
          title: Origin
          type: string
          maxLength: 20
        subtotal:
          title: Subtotal
          type: string
          format: decimal
          readOnly: true
        iva:
          title: Iva
          type: string
          format: decimal
          readOnly: true
        shipping_price:
          title: Shipping price
          type: string
          format: decimal
          readOnly: true
        shipping_discount:
          title: Temporal shipping discount
          type: string
          format: decimal
          nullable: true
        shipping_cost:
          title: Shipping cost
          type: string
          format: decimal
          readOnly: true
        discount:
          title: Order discount
          type: string
          format: decimal
          readOnly: true
        total:
          title: Total
          type: string
          format: decimal
          readOnly: true
        payment_date:
          title: Payment date
          type: string
          format: date-time
          readOnly: true
        shipping_date:
          title: Shipping date
          type: string
          format: date-time
          readOnly: true
        expected_delivery_date:
          title: Expected delivery date
          type: string
          format: date-time
          readOnly: true
        max_delivery_date:
          title: Maximum delivery date
          type: string
          format: date-time
          readOnly: true
        receiving_date:
          title: Receiving date
          type: string
          format: date-time
          readOnly: true
        folio:
          title: Folio
          type: string
          maxLength: 20
        cfdi:
          title: Facturama's cfdi id
          type: string
          readOnly: true
          minLength: 1
        external_payment_id:
          title: External payment id
          type: string
          readOnly: true
          minLength: 1
        generated_by:
          title: Order generated by user
          type: integer
          nullable: true
        updated_by:
          title: Last user to update order
          type: integer
          nullable: true
        reminder:
          title: Reminder
          type: integer
          nullable: true
        subscription:
          title: Subscription
          type: integer
          readOnly: true
    OrderDetailWrite:
      required:
        - product
        - quantity
      type: object
      properties:
        id:
          title: ID
          type: integer
          readOnly: true
        product:
          title: Product
          type: integer
        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
          readOnly: true
        subtotal:
          title: Subtotal
          type: string
          format: decimal
          readOnly: true
        total:
          title: Total
          type: string
          format: decimal
          readOnly: true
        discount:
          title: Discount
          type: string
          format: decimal
          readOnly: true
        iva:
          title: Iva
          type: string
          format: decimal
          readOnly: true
        quantity:
          title: Quantity
          type: integer
          maximum: 32767
          minimum: 0
        order:
          title: Order
          type: integer
          readOnly: true
    PrescriptionWrite:
      required:
        - document
        - issue_date
      type: object
      properties:
        id:
          title: ID
          type: integer
          readOnly: true
        document:
          title: File Content
          type: string
          readOnly: false
          description: Content of the file base64 encoded
          format: uri
        document_name:
          title: Document name
          type: string
          minLength: 1
        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
        is_verified:
          title: Is verified
          type: boolean
          readOnly: true
        patient:
          title: Patient
          type: integer
          readOnly: true
        order:
          title: Order
          type: integer
          readOnly: true
        updated_by:
          title: Last user to update prescription
          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

````