Close a membership sale invoice

POST https://api.zenoti.com/Catalog/Memberships/CloseInvoice/{invoice_id}

This API helps you to close the invoice of a membership sale.

You must specify appropriate details for the invoice_id parameter in the API request. For more information, refer to the Request 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/Memberships/CloseInvoice/{invoice_id}

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

Request

Headers

Header Required Description
Authorization Yes bearer {{access_token}}

Path parameters

Parameter Type Required Description
invoice_id string Yes Unique 32-character identifier of the membership sale invoice.

Response

Success (201 Created)

{
  "MailSentSuccess": false,
  "ReceiptSentSuccess": false,
  "Invoice": {
    "Id": "693b776f-efbf-4e06-b230-2bf3783de71b",
    "InvoiceNumber": "2823",
    "GroupInvoiceId": {},
    "group_name": {},
    "ReceiptNumber": "R251",
    "AppointmentGroupId": {},
    "ReservationId": {},
    "IsRebooking": false,
    "Notes": {},
    "GuestId": {},
    "Guest": {
      "...": "..."
    },
    "Price": {
      "...": "..."
    },
    "SaleDate": "2020-09-24T16:39:06",
    "FutureRecurringBillDate": {},
    "LinkedInvoiceId": {},
    "Status": 4,
    "InvoiceServices": [
      {
        "...": "..."
      }
    ],
    "InvoiceProducts": [
      {
        "...": "..."
      }
    ],
    "InvoiceMemberships": [
      {
        "...": "..."
      }
    ],
    "InvoiceDayPackages": [
      {
        "...": "..."
      }
    ],
    "InvoiceSeriesPackages": [
      {
        "...": "..."
      }
    ],
    "InvoiceGiftCards": [
      {
        "...": "..."
      }
    ],
    "InvoicePrepaidCards": [
      {
        "...": "..."
      }
    ],
    "Payments": [
      {
        "...": "..."
      }
    ],
    "Redemptions": [
      {
        "...": "..."
      }
    ],
    "RefundItems": [
      {
        "...": "..."
      }
    ],
    "Lock": true,
    "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
MailSentSuccess boolean
ReceiptSentSuccess boolean
Invoice object
Invoice.Id string
Invoice.InvoiceNumber string
Invoice.GroupInvoiceId object
Invoice.group_name object
Invoice.ReceiptNumber string
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/Memberships/CloseInvoice/{invoice_id}' \
  --header 'Authorization: bearer {{access_token}}'
const response = await fetch('https://api.zenoti.com/Catalog/Memberships/CloseInvoice/{invoice_id}', {
  method: 'POST',
  headers: {
    'Authorization': 'bearer {{access_token}}'
  },
});
const data = await response.json();
import requests

response = requests.post(
    'https://api.zenoti.com/Catalog/Memberships/CloseInvoice/{invoice_id}',
    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/Memberships/CloseInvoice/{invoice_id}");
var data = await response.Content.ReadAsStringAsync();
require 'net/http'
require 'json'

uri = URI('https://api.zenoti.com/Catalog/Memberships/CloseInvoice/{invoice_id}')
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