Get Orden de compra


The following endpoint can be used to retrieve the details of a orden de compra within the Hyfin application.


Punto Final

The following endpoint can be used to retrieve a orden de compra. You must replace the {base_url} , {_id} and {site_id} variables with the appropriate values.

GET
{base_url}/api/v4/site/{site_id}/orden de compra/{_id}
Solicitud
Ningún cuerpo es necesario para esta llamada de API
Respuesta
Campo
Tipo
Requerido
Descripción
_id
String
The id of the invoice. This field is auto generated by the system and is not required when creating a new invoice, but it is required when updating an existing invoice.
orden de compra_number
String
El número único asignado por el sistema fuente y mostrado al cliente en el orden de compra.
totals
The total amounts on the orden de compra. Validated against the sum of the line items found in `lines`.
customer
--
Una referencia al registro del cliente. Omita este campo para recibir un enlace al orden de compra.
invoice_term_name
String
--
The invoice term name for the orden de compra. Defaults to the customer invoice term if it exists, unless `null` is passed in.
lines
--
A list of line items on the orden de compra. Required if `description` is not passed in.
description
String
--
A short description of the products/services on the orden de compra. Required if `lines` are not passed in.
orden de compra_date
Date
--
La fecha del orden de compra. Si se establece en el futuro, la solicitud no se enviará hasta esa fecha. El valor predeterminado es hoy si se deja en blanco. Format = YYYY-MM-DD
customer_memo
String
--
Una nota presentada al cliente en la parte inferior del orden de compra.
internal_memo
String
--
Un memo agregado en la parte inferior del orden de compra. Solo visible para el personal interno, nunca se muestra a los clientes.
active
Boolean
--
Esta bandera representa si el registro orden de compra está activo y disponible para ser utilizado o no.
Default = `true`
payments
--
Una lista de pagos realizados en el orden de compra.
webhook_url
String
--
La URL a la que se enviará la publicación cuando se realicen ciertas acciones en el orden de compra. Se enviarán notificaciones cuando un texto/correo electrónico falle, un cliente haga clic en un enlace o realice un pago.
created_at
Date
--
La fecha en que se creó el orden de compra.
updated_at
Date
--
La fecha en que se actualizó por última vez el orden de compra.
attachment_refs
--
Una lista de adjuntos.
bill_to_customer
--
The customer to bill, if different than the customer.
bill_to
--
Optional overrides for the Bill To section of the invoice. If bill_to_customer is provided, this object will be merged with the customer's information and can be used to override specific fields. If bill_to_customer is not provided, the fields in this object will be used as the Bill To information on the invoice.
sold_to
--
Optional overrides for the Sold To / Customer section of the invoice.
Sample Response
			
				{
  "_id": "61f32dc2f62bdc6a48945067",
  "invoice_number": "12345",
  "description": "",
  "customer_memo": "",
  "internal_memo": "",
  "due_date": "2021-10-01",
  "totals": {
    "taxes": 2.85,
    "total": 30
  },
  "customer": {
    "_id": "61f32dc2f62bdc6a48951255",
    "first_name": "John",
    "last_name": "Doe",
    "mobile_phone": "111-222-3333",
    "email": "johndoe@abc.com"
  },
  "lines": [
    {
      "description": "",
      "product": {
        "_id": "62166eda3a8c0517866b9b46",
        "name": "Mens Large T-shirt",
        "unit_price": 15
      },
      "unit_price": 15,
      "qty": 2,
      "total": 30
    }
  ],
  "payments": [
    {
      "_id": "62166eda3a8c0517866b9r23",
      "payment_type": "payment_card",
      "payment_sub_type": "amex",
      "display_name": "AMEX ****** 3422",
      "last_4": "3422",
      "total": 30,
      "paid_on": "2021-03-15T16:32:11Z",
      "status": "captured",
      "active": true
    }
  ],
  "notifications": [
    {
      "error": false,
      "value": "test@test.com",
      "description": "Email to test@test.com sent",
      "at": "2021-03-15T13:32:11Z"
    },
    {
      "error": false,
      "value": "999-123-4567",
      "description": "Text to 999-123-4567 sent",
      "at": "2021-03-15T13:32:11Z"
    }
  ],
  "webhook_url": "https://yourcompany.com/webhook",
  "created_at": "2025-05-30T19:19:44.143Z",
  "updated_at": "2025-05-30T19:19:44.143Z"
}