Purchases

Beacon details and endpoints for Purchase resources

Overview

The Purchases resource provides information about Purchases submitted for a Covered Entity including the unique Beacon ID assigned to the Purchase, the underlying Invoice number, and any issues detected with the Purchase. Partners can provide multiple query parameters to the Purchases endpoint to receive a filtered response. As an example, the entity_ID query parameter will return Purchases for that specific entity ID. The invoice_number will return Purchases associated with a specific Invoice number.

View the Beacon Invoices guide to learn more.


Endpoints


Query params

ParamRequiredDescriptionExample
start_datefalseStart date of the Purchase date2025-01-01
end_datefalseEnd date of the Purchase date2025-02-10
entity_idfalse340B ID of the Covered Entity that placed the PurchaseDSH123456
invoice_numberfalseThe Invoice number assigned by the wholesaler for the Purchase made by the 340B Covered Entity7449818066
invoice_idfalseThe id of the Invoice Submission to BeaconSUB-1142...



Purchases

Fetch all Purchases

Request

GET /api/purchases


Response

{
  'purchases': [
    {
      'purchase_id': 'PUR-TzoAVSPQ5VwnOKl7XzPg8nCJSJQPjf7V',
      'invoice_number': '7449818066',
      'submission_date': '2025-01-10',
      'invoice_date': '2025-01-01',
      'ndc': '50458057930',
      'entity_id': 'DSH123456',
      'ship_to': '1386768067',
      'verified_qty': 50,
      'quantity': 50,
      'issues': [],
      'wholesaler': 'McKesson'
    },
    {
      'purchase_id': 'PUR-qFHcYLzqAM2kOMJljhbTqAgszvjBzC1S',
      'invoice_number': '7449810543',
      'submission_date': '2025-01-10',
      'invoice_date': '2025-01-01',
      'ndc': '50458057930',
      'entity_id': 'DSH123456',
      'ship_to': '1386768067',
      'verified_qty': 40,
      'quantity': 50,
      'issues': [],
      'wholesaler': 'McKesson'
    }
  ]
} 
{
  'type': 'error.list',
  'request_id': '494f1f50595e6884ba0f0570e4394bd5',
  'errors': [
    {
      'code': 'not_found',
      'message': 'Purchases not found'
    }
  ]
}



Purchase

Get a single Purchase given purchase_id

Request

GET /api/purchases/:purchase_id


Response

{
  'invoice_number': '7449818066',
  'submission_date': '2025-01-10',
  'invoice_date': '2025-01-01',
  'ndc': '50458057930',
  'entity_id': 'DSH123456',
  'ship_to': '1386768067',
  'verified_qty': 50,
  'quantity': 50,
  'issues': [],
  'wholesaler': 'McKesson'
}
{
  'type': 'error.list',
  'request_id': '494f1f50595e6884ba0f0570e4394bd5',
  'errors': [
    {
      'code': 'not_found',
      'message': 'Purchase not found'
    }
  ]
}



Response Data Reference


FieldDefinition
invoice_numberthe Invoice number assigned by the wholesaler for the Purchase made by the 340B Covered Entity
date_submitteddate Invoice was submitted to Beacon
invoice_datethe date on which the Invoice for the Purchase was issued by the wholesaler to the 340B Covered Entity
ndc11 digit National Drug Code
entity_id340B ID of Covered Entity
ship_tounique public NPI for the ship to pharmacy
verified_qtynumber of Packages of the NDC-11 as validated by Beacon
quantitynumber of Packages of the NDC-11 purchased by the 340B Covered Entity
issueswill return empty array if no issues identified otherwise identifies issues associated with Purchases in the Invoice Submission
wholesalername of the wholesaler through which the Covered Entity made the Purchase

Did this page help you?