واجهة برمجة تطبيقات Ticketor ووثائق التكامل

واجهة برمجة تطبيقات Ticketor ووثائق التكامل

Introductions to Ticketor API, getting access and credentials

API Introduction

Ticketor's API allows you to access your site and data through code. Check back as more APIs become available.

Getting Access

To get access to the API, you need to chat with your support engineer and request API access.

Charges

There is a charge to use Ticketor's API. After you are given access to the API, you can check your Control Panel > Account & Settings > Plans & Features to see your API charges. Charges are per record imported or exported from the system. So, it is important to keep your API credentials safe and secret and set your API calls or Webhooks wisely to minimize the charge.

API Credentials

Most API calls require authorization. We use "Basic Auth" for authorization, which means you need a username and password to make any API call.

Create a user on your site, either by signing up, or creating a new user from the User Manager. Choose a strong password.

Go to the User Manager, edit the user and give them proper roles, most likely, the "Administrator" role. The user can perform API calls based on their roles and permissions. Most actions require administrative roles.

Also, give the user the "API Access" permission.

You can have as many users with API permission.

You will need the following information for API authorizations:

  • Username or Email: The email address of the user with API permission and administrative or any other required roles
  • Password: The password of the user with API permission
  • Base URL: https://ar.Ticketor.com/api/1
  • Client ID / Company ID: 1

خطافات الويب

Webhooks

Webhook Introduction

A webhook is a software hook that sends data and executable commands from one application to another over HTTP. Webhooks are triggered by an event in a source system and sent to a destination system, often with a payload of data.

You can create webhooks in Ticketor to execute and send information to your other applications, when something happens in your system.

For example, a webhook can be set to fire whenever a new user signs up on your system. The webhook makes an http POST call to the URL you specify and sends the data about the new user, including their name, email, phone number and mailing list preference in JSON format to the other system.

Creating Webhooks

Webhooks can also be created to fire when there is a new sale, a new sold ticket, a new sold merchandise, a new donation or a new user. They can also be limited to certain event or certain merchandise or donation so they only fire for that specific item.

Webhooks can be create from the UI in Control Panel > Account & Settings > Webhooks, or they can be created through API.

Most webhooks execute as soon as the event happens. However, some webhooks, like the user signup webhook, may take up to 30 minutes after the sign up to fire.

Here are the list of supported webhooks and the data format they return:

  • New User: Triggers when a new user signs up or is created in your system and passes the user information
    
     {
      "Id": 123,
      "SignupDate": "2023-11-03T22:11:58.9951297Z",
      "FirstName": "John",
      "LastName": "Smith",
      "Email": "test@email.com",
      "Phone": "8100000000",
      "Mobile": "8100000000",
      "MailingListPermission": true,
      "SMSPermission": true
    }
                                
  • New Invoice (Sales): Triggers when a new sales happen in your system and passes the invoice information including the total amount, any discount, buyer information, agent information and the number of items in the invoice
    
     {
      "Id": 26657,
      "Date": "2014-02-03T15:53:48.297Z",
      "InvoiceType": "Sale",
      "RelatedInvoiceId": 0,
      "ReturnStatus": "NotReturned",
      "Referrer": "",
      "Notes": "",
      "Amount": {
        "Total": 1,
        "Currency": "USD",
        "ServiceCharge": 0,
        "Tax": 0,
        "Tip": 0,
        "Discount": 0,
        "PromotionId": 0,
        "PromotionCode": ""
      },
      "PlatformFee": {
        "Fee": 0.03,
        "TicketProtectionFee": 0,
        "AdFee": 0,
        "PaymentProcessingFee": 0,
        "DeliveryFee": 0
      },
      "Buyer": {
        "Id": 11708,
        "FirstName": "ZacXXXX",
        "LastName": "SmiXX",
        "Email": "11708@x.xxx",
        "Phone": ""
      },
      "Agent": {
        "Id": 11708,
        "FirstName": "ZacXXXX",
        "LastName": "SmiXX",
        "Email": "11708@x.xxx",
        "Phone": ""
      },
      "Shipping": {
        "Status": "0",
        "Date": null,
        "Carrier": "",
        "TrackingNo": "",
        "Address": {
          "FirstName": "FirstName",
          "LastName": "LastName",
          "AddressLine1": "Address",
          "AddressLine2": "Address2",
          "City": "City",
          "State": "State",
          "Zipcode": "Zip",
          "Country": "Country",
          "Phone": "Phone",
          "CellPhone": "CellPhone",
          "Notes": "Notes"
        }
      },
      "WillCall": {
        "Status": "0",
        "Date": null
      },
      "ProductsCount": 0,
      "TicketsCount": 1
    }
                                
  • New Invoice (Sales) with Details: Is similar to the "New Invoice" trigger, but also provides additional records of information, including one record per ticket or item sold in the invoice and one record for every payment method used in the invoice
    
     {
      "Id": 26657,
      "Date": "2014-02-03T15:53:48.297Z",
      "InvoiceType": "Sale",
      "RelatedInvoiceId": 0,
      "ReturnStatus": "NotReturned",
      "Referrer": "",
      "Notes": "",
      "Amount": {
        "Total": 1,
        "Currency": "USD",
        "ServiceCharge": 0,
        "Tax": 0,
        "Tip": 0,
        "Discount": 0,
        "PromotionId": 0,
        "PromotionCode": ""
      },
      "PlatformFee": {
        "Fee": 0.03,
        "TicketProtectionFee": 0,
        "AdFee": 0,
        "PaymentProcessingFee": 0,
        "DeliveryFee": 0
      },
      "Buyer": {
        "Id": 12345,
        "FirstName": "John",
        "LastName": "Smith",
        "Email": "JohnSmith@email.com",
        "Phone": "1234567890"
      },
      "Agent": {
        "Id": 12345,
        "FirstName": "Mary",
        "LastName": "Doe",
        "Email": "Mary@email.com",
        "Phone": "2345678912"
      },
      "Shipping": {
        "Status": "0",
        "Date": null,
        "Carrier": "",
        "TrackingNo": "",
        "Address": {
          "FirstName": "FirstName",
          "LastName": "LastName",
          "AddressLine1": "Address",
          "AddressLine2": "Address2",
          "City": "City",
          "State": "State",
          "Zipcode": "Zip",
          "Country": "Country",
          "Phone": "Phone",
          "CellPhone": "CellPhone",
          "Notes": "Notes"
        }
      },
      "WillCall": {
        "Status": "0",
        "Date": null
      },
      "ProductsCount": 1,
      "TicketsCount": 1,
      "Payments": [
        {
          "Id": 16404,
          "ChargeMethod": "PRIOR_AUTH_CAPTURE",
          "Amount": 1,
          "Currency": "USD",
          "PaymentType": "Visa",
          "InvoiceId": 26657,
          "Description": "1 tickets for Testmerchantplus",
          "Date": "2014-04-11T13:34:17.53Z",
          "Card": {
            "CardNumber": "1111",
            "DueDate": null,
            "CardHolderName": "John Smith",
            "ExpirationMonth": 1,
            "ExpirationYear": 2015
          },
          "DeductedAmountByPlatform": 0,
          "BillingAddress": {
            "FirstName": "John",
            "LastName": "Smith",
            "AddressLine1": "123 main st",
            "AddressLine2": "",
            "City": "Los Angeles",
            "State": "CA",
            "Zipcode": "00000",
            "Country": "United States",
            "Phone": "4500000000",
            "CellPhone": "4500000000"
          },
          "Success": true,
          "CashRegisterId": 0,
          "PaymentProcessorEventOrganizerId": 0,
          "Buyer": {
            "Id": 123,
            "FirstName": " John",
            "LastName": " Smith",
            "Email": "JohnSmith@Email.com",
            "Phone": "4500000000"
          }
        }
      ],
      "Tickets": [
        {
          "Id": 32785,
          "InvoiceId": 26657,
          "Status": "sold",
          "Section": "Balcony Right",
          "Row": "A",
          "Seat": 242,
          "BuyPrice": 23.75,
          "SellPrice": 25,
          "ServiceCharge": 1.25,
          "PriceLevelName": "",
          "Barcode": "278592011",
          "ExpirationDate": "2200-01-01T08:00:00Z",
          "LastScannedAt": null,
          "DeliveryMethod": "Will-Call (Venue pickup)",
          "Event": {
            "EventId": 257,
            "EventName": "Great Concert - Tuesday December 17, 2013 at 10:01 AM ",
            "EventDate": "2013-12-17T18:01:00Z"
          },
          "Buyer": {
            "Id": 12345,
            "FirstName": "John",
            "LastName": "Smith",
            "Email": "JohnSmith@email.com",
            "Phone": "1234567890"
          }
        }
      ],
      "Products": [
        {
          "Id": 13778,
          "InvoiceId": 26657,
          "Product": {
            "ProductId": 10099,
            "ProductName": "T Shirt"
          },
          "Amount": 1,
          "ReturnedAmount": 0,
          "UnitPrice": 5,
          "Discount": 0,
          "Tax": 0,
          "options": "",
          "IsRecurringPurchase": false,
          "RecursInDays": 0,
          "DeliveryMethodId": 70,
          "DeliveryMethod": "Direct",
          "DeliveryFee": 0,
          "OrderStatus": "Completed",
          "Buyer": {
            "Id": 12345,
            "FirstName": "John",
            "LastName": "Smith",
            "Email": "JohnSmith@email.com",
            "Phone": "1234567890"
          }
        }
      ]
    }
                                
  • New Ticket Sale: Triggers when a new ticket is sold in your system and provides the ticket information. This trigger can be limited to certain event.
    
     {
      "Id": 5997121,
      "InvoiceId": 26657,
      "Status": "sold",
      "Section": "a",
      "Row": "1",
      "Seat": 1,
      "BuyPrice": 10,
      "SellPrice": 10,
      "ServiceCharge": 0,
      "PriceLevelName": "VIP",
      "Barcode": "9971217295658",
      "ExpirationDate": "2200-01-01T08:00:00Z",
      "LastScannedAt": null,
      "DeliveryMethod": "Direct",
      "Event": {
        "EventId": 154112,
        "EventName": "Great Concert- Sunday May 31, 2020 at 08:00 PM ",
        "EventDate": "2020-06-01T03:00:00Z"
      },
      "Buyer": {
        "Id": 12345,
        "FirstName": "John",
        "LastName": "Smith",
        "Email": "JohnSmith@email.com",
        "Phone": "1234567890"
      }
    }                            
  • New Merchandise Sale or Donation Collection: Triggers when a new merchandise sale or donation happens in your system and provides the item's information. This trigger can be limited to certain merchandise, donation or campaign.
    
     {
      "Id": 13778,
      "InvoiceId": 908515,
      "Product": {
        "ProductId": 10099,
        "ProductName": "T Shirt"
      },
      "Amount": 1,
      "ReturnedAmount": 0,
      "UnitPrice": 5,
      "Discount": 0,
      "Tax": 0,
      "options": "",
      "IsRecurringPurchase": false,
      "RecursInDays": 0,
      "DeliveryMethodId": 70,
      "DeliveryMethod": "Direct",
      "DeliveryFee": 0,
      "OrderStatus": "Completed",
      "Buyer": {
        "Id": 12345,
        "FirstName": "John",
        "LastName": "Smith",
        "Email": "JohnSmith@email.com",
        "Phone": "1234567890"
      }
    }
                                
  • New Payment Received: Triggers when a new payment is received as part of a sales, and passes the details of the payment and payment method
    
     {
      "Id": 16404,
      "ChargeMethod": "PRIOR_AUTH_CAPTURE",
      "Amount": 1,
      "Currency": "USD",
      "PaymentType": "Visa",
      "InvoiceId": 29951,
      "Description": "1 tickets for Testmerchantplus",
      "Date": "2014-04-11T13:34:17.53Z",
      "Card": {
        "CardNumber": "1111",
        "DueDate": null,
        "CardHolderName": "John Smith",
        "ExpirationMonth": 1,
        "ExpirationYear": 2015
      },
      "DeductedAmountByPlatform": 0,
      "BillingAddress": {
        "FirstName": "John",
        "LastName": "Smith",
        "AddressLine1": "123 main st",
        "AddressLine2": "",
        "City": "Los Angeles",
        "State": "CA",
        "Zipcode": "00000",
        "Country": "United States",
        "Phone": "4500000000",
        "CellPhone": "4500000000"
      },
      "Success": true,
      "CashRegisterId": 0,
      "PaymentProcessorEventOrganizerId": 0,
      "Buyer": {
        "Id": 123,
        "FirstName": " John",
        "LastName": " Smith",
        "Email": "JohnSmith@Email.com",
        "Phone": "4500000000"
      }
    }
                                

زابير

Zapier

Zapier Introduction

Zapier is a product developed by Zapier Inc. that allows end users to integrate the web applications they use and automate workflows.

Zapier allows you to integrate Ticketor with thousands of other systems and sites that are supported by Zapier.

You can configure Zapier to take some actions when a new event happens in your Ticketor site.

For example, if you want to use a 3rd party inventory manager or shipping system with Ticketor, you can create a Zap in Zapier that fires when a new merchandise sales happen in Ticketor. The Zap gets fired with the details of the sold merchandise. The Zap then can take other actions in the other integrated systems. For example, it can print a shipping label in your shipping manager system, or place an order on a provider system.

Ticketor's Zappier app can be found at https://zapier.com/apps/ticketor/integrations

It allows you to create Zaps that trigger when:

  • New User: Triggers when a new user signs up or is created in your system and passes the user information
  • New Invoice (Sales): Triggers when a new sales happen in your system and passes the invoice information including the total amount, any discount, buyer information, agent information and the number of items in the invoice
  • New Invoice (Sales) with Details: Is similar to the "New Invoice" trigger, but also provides additional records of information, including one record per ticket or item sold in the invoice and one record for every payment method used in the invoice
  • New Ticket Sale: Triggers when a new ticket is sold in your system and provides the ticket information. This trigger can be limited to certain event.
  • New Merchandise Sale or Donation Collection: Triggers when a new merchandise sale or donation happens in your system and provides the item's information. This trigger can be limited to certain merchandise, donation or campaign.
  • New Payment Received: Triggers when a new payment is received as part of a sales, and passes the details of the payment and payment method

To use Zapier, you need the following information.

  • Username or Email: The email address of the user with API permission and administrative or any other required roles
  • Password: The password of the user with API permission
  • Client ID: 1