Create an invoice for the sale of a series package

POST https://api.zenoti.com/Catalog/SeriesPackages/CreateInvoice

This API helps you to create an invoice for the sale of a series package.

You must specify appropriate details for the parameters in the API request body. For more information, refer to the Request Body Parameters table.


On this page


Before you begin

Permission: Manage API Keys (on the Administrator security object) — Required to access Zenoti APIs.

Endpoint

POST /Catalog/SeriesPackages/CreateInvoice

Base URL: https://api.zenoti.com

Request

Headers

Header Required Description
Authorization Yes bearer {{access_token}}

Query parameters

Parameter Type Required Default Description
CenterId string No — Unique 32-character identifier of the center.
userId string No — Unique 32-character identifier of the guest.
packageIds string No — IDs of the package applied on the appointment invoice.

Response

Success (201 Created)

{
  "Invoice": {
    "Id": "533f0849-7f25-4afe-b99f-e1b50e65c549",
    "InvoiceNumber": "",
    "GroupInvoiceId": {},
    "group_name": {},
    "ReceiptNumber": {},
    "AppointmentGroupId": {},
    "ReservationId": {},
    "IsRebooking": false,
    "Notes": {},
    "GuestId": {},
    "Guest": {
      "...": "..."
    },
    "Price": {
      "...": "..."
    },
    "SaleDate": "2020-09-24T17:41:50",
    "FutureRecurringBillDate": {},
    "LinkedInvoiceId": {},
    "Status": 1,
    "InvoiceServices": [
      {
        "...": "..."
      }
    ],
    "InvoiceProducts": [
      {
        "...": "..."
      }
    ],
    "InvoiceMemberships": [
      {
        "...": "..."
      }
    ],
    "InvoiceDayPackages": [
      {
        "...": "..."
      }
    ],
    "InvoiceSeriesPackages": [
      {
        "...": "..."
      }
    ],
    "InvoiceGiftCards": [
      {
        "...": "..."
      }
    ],
    "InvoicePrepaidCards": [
      {
        "...": "..."
      }
    ],
    "Payments": [
      {
        "...": "..."
      }
    ],
    "Redemptions": [
      {
        "...": "..."
      }
    ],
    "RefundItems": {},
    "Lock": false,
    "CanChangeGuest": false,
    "CenterId": "d51712b1-6040-4dd4-abff-cffc9d36f89e",
    "Center": {
      "...": "..."
    },
    "CollectFeedback": true,
    "BookingWizardAdvancedMode": false,
    "Refunded": false,
    "InvoiceAuthStatus": -3,
    "InvoiceAuthorizationStatus": -3,
    "InvTransactionStatusForAutoPay": -2,
    "InvoiceSource": 2,
    "is_created_from_booking_wizard": false,
    "RemoveBuddyServiceFinishSegment": {},
    "host_id": {},
    "payment_made_by": {},
    "entity_name": {},
    "email_link": {},
    "sms_link": {}
  },
  "PaymentOptions": {},
  "Error": {}
}

Response fields

Field Type Description
Invoice object
Invoice.Id string
Invoice.InvoiceNumber string
Invoice.GroupInvoiceId object
Invoice.group_name object
Invoice.ReceiptNumber object
Invoice.AppointmentGroupId object
Invoice.ReservationId object
Invoice.IsRebooking boolean
Invoice.Notes object
Invoice.GuestId object
Invoice.Guest object
Invoice.Price object
Invoice.SaleDate string
Invoice.FutureRecurringBillDate object
Invoice.LinkedInvoiceId object
Invoice.Status integer
Invoice.InvoiceServices object[]
Invoice.InvoiceProducts object[]
Invoice.InvoiceMemberships object[]
Invoice.InvoiceDayPackages object[]
Invoice.InvoiceSeriesPackages object[]
Invoice.InvoiceGiftCards object[]
Invoice.InvoicePrepaidCards object[]
Invoice.Payments object[]
Invoice.Redemptions object[]
Invoice.RefundItems object
Invoice.Lock boolean
Invoice.CanChangeGuest boolean
Invoice.CenterId string
Invoice.Center object
Invoice.CollectFeedback boolean
Invoice.BookingWizardAdvancedMode boolean
Invoice.Refunded boolean
Invoice.InvoiceAuthStatus integer
Invoice.InvoiceAuthorizationStatus integer
Invoice.InvTransactionStatusForAutoPay integer
Invoice.InvoiceSource integer
Invoice.is_created_from_booking_wizard boolean
Invoice.RemoveBuddyServiceFinishSegment object
Invoice.host_id object
Invoice.payment_made_by object
Invoice.entity_name object
Invoice.email_link object
Invoice.sms_link object
PaymentOptions object
Error object

Example

curl --request POST \
  --url 'https://api.zenoti.com/Catalog/SeriesPackages/CreateInvoice' \
  --header 'Authorization: bearer {{access_token}}'
const response = await fetch('https://api.zenoti.com/Catalog/SeriesPackages/CreateInvoice', {
  method: 'POST',
  headers: {
    'Authorization': 'bearer {{access_token}}'
  },
});
const data = await response.json();
import requests

response = requests.post(
    'https://api.zenoti.com/Catalog/SeriesPackages/CreateInvoice',
    headers={
        'Authorization': 'bearer {{access_token}}',
    },
)
data = response.json()
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "bearer {{access_token}}");
var response = await client.PostAsync(
    "https://api.zenoti.com/Catalog/SeriesPackages/CreateInvoice");
var data = await response.Content.ReadAsStringAsync();
require 'net/http'
require 'json'

uri = URI('https://api.zenoti.com/Catalog/SeriesPackages/CreateInvoice')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Authorization'] = 'bearer {{access_token}}'
response = http.request(request)
data = JSON.parse(response.body)

Error codes

Status Description
400 400
401 Unauthorized -- invalid or expired access token
429 Too many requests -- rate limit exceeded