REST Examples


Getting Started

HTTP Methods

GET - Used for retrieval methods. A GET method does not support a HTTP request body, so all request information is specified in the URL and query string. Examples:
https://api.yourhost.com/accounts/10010
https://api.yourhost.com/api/accounts/1050213/journalentries?PageSize=5

POST - Methods that insert information into Tigerpaw. Because of the extra information required, Search and Advanced Search requests also use the POST method. These methods require a value or an object definition in the body of the HTTP request. This method type requires a Content-Length header set to the total length of the body contents.

PUT - Methods used to update information in Tigerpaw. These methods require a value or object definition in the body of the HTTP request. This method type requires a Content-Length header set to the total length of the body contents.

DELETE - Used to delete information from Tigerpaw. These methods use a mixture of URL and query string values and values defined in the body of the HTTP request.


Security

Please contact your account manager to request a copy of the Tigerpaw REST API Reference Guide. The reference guide will provide more information about security, including examples to help you get started.


Data formats

Using the Accept and Content-Type HTTP header you can control the data format of the request and response. By default the API will accept and return information in JSON format.

JSON response

GET /api/accounts/1053145 HTTP/1.1
Accept: application/json
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9

XML response

GET /api/accounts/1053145 HTTP/1.1
Accept: application/xml
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9

JSON request and response

GET /api/accounts/1053145 HTTP/1.1
Accept: application/xml
Content-Type: application/json
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9

XML request and response

GET https://yourdomain.com/api/accounts/1053145 HTTP/1.1
Accept: application/json
Content-Type: application/xml
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9

Note that the content and accept types do not need to be the same.


Paging

To page the results from a search or other lists add the PageSize and StartRow properties to URL. The PageSize property specifies the number of items to return. StartRow identifies the row number in the results to start the page from. If the StartRow is not specified it will be defaulted to 0 for the first row. By default the API is configured to allow a maximum page size of 50. The maximum page size can be changed in the web.config for the API. For more information refer to the Installation Requirements and Checklist for the REST API on configuring the SearchMaxPageSize.

GET /api/accounts/1050213/journalentries?PageSize=5 HTTP/1.1
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9
GET /api/accounts/1050213/journalentries?PageSize=5&StartRow=5 HTTP/1.1
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9
GET /api/accounts/1050213/journalentries?PageSize=5&StartRow=10 HTTP/1.1
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9

The NextRow property in the response is the value for StartRow property for the next page.

{
   "JournalEntries":    [
            {
         "JournalEntry":          {
            "JournalEntryId": 1182308,
            "AccountNumber": 1050213,
            "RepNumber": 924,
            "Note": "Created Opportunity 13946 (Custom Form).",
            "DateCreated": "2016-08-22T00:00:00",
            "StartTime": "1900-01-01T15:20:17",
            "EndTime": "1900-01-01T15:20:00",
            "IsSystemEntry": true
         },
         "AccountName": "We Monitor Networks, Inc.",
         "PhoneNumber": "(123) 456-7890",
         "Rep":          {
            "FirstName": "Radhika",
            "LastName": "R",
            "PhoneNumber": "(402) 156-4566",
            "EmailAddress": "radhika@tigerpawsoftware.com",
            "DisplayName": "Radhika R",
            "SearchName": "Radhika R (radhika@tigerpawsoftware.com)"
         }
      },
    
    .....
   ],

"PageSize": 5,
"NextRow": 5,
"TotalCount": 2286,
"Success": true
}


Accounts

Search

Each document type provides both a basic and an advanced search method. Both methods require an HTTP POST with the criteria in the body of the request. When using a JSON request the value should be enclosed in quotes. For XML, use <string></string> tags.

POST /api/accounts/search/name HTTP/1.1
Content-Type: application/json
Content-Length: 6
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9
"one*"
POST /api/accounts/search/name HTTP/1.1
Content-Type: application/xml
Content-Length: 33
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9
<string>one*</string>

When performing an advanced search, if the search types are the same an OR condition will be used; otherwise it will be an AND condition. In the example request we are searching for accounts with a phone number that starts with 402 OR 531 OR 605 AND that have a contact name that contains "jim". Also notice that we have limited the response to the first 10 accounts that match the criteria.

POST /api/accounts/search HTTP/1.1
Content-Type: application/json
Content-Length: 388
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9
{
  "Criteria": [
    {
      "SearchType": "PhoneNumber",
      "Criteria": "402",
    },
    {
      "SearchType": "PhoneNumber",
      "Criteria": "531",
    },
    {
      "SearchType": "PhoneNumber",
      "Criteria": "605",
    },
    {
      "MatchType" : "Contains",
      "SearchType": "ContactName",
      "Criteria": "jim",
    }     
  ],

"PageSize": 10

}

You can also use an asterik or percent sign as wildcard values in the Criteria instead of the MatchType property. For example "%smith%" or "*smith*".


Account summary or detail information

When retrieving information for a specific account you can specify the type of object you want. The summary object is a simple object that matches the information returned in the search or list responses. A detail object will return complete information about the account.

Summary

GET /api/accounts/100 HTTP/1.1
Content-Type: application/json
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9

Detail

GET /api/accounts/100/detail HTTP/1.1
Content-Type: application/json
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9

Create a new account

The following will create an account with an initial phone number.

POST /api/accounts HTTP/1.1
Content-Type: application/json
Content-Length: 190
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9
{
    "Account": 
	{
		"Name": "Apex Dental",
		"RepNumber": 19,
		"Status": "Active",
		"AccountType":"Prospect",
	},
	"PrimaryPhoneNumber": 
	{
		"Number": "402-555-5555",
	}
}

Update an existing account

The following will update an existing account. The API does not support partial updates documents like the Account. It is recommended that you retieve the Account summary or detail and apply your changes to the object before making your request.

PUT /api/accounts/100 HTTP/1.1
Content-Type: application/json
Content-Length: 762
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9
{
    "Name": "Apex Dental Inc.",
    "AccountID": "123456789",
    "Address1": "12345 Main St",
    "Address2": "Suite 122",
    "City": "Omaha",
    "State": "NE",
    "PostalCode": "68127",
    "Country": null,
    "AccountType": "Company",
    "Status": "Active",
    "HotNote": null,
    "DirectionsToLocation": null,
    "SpecialInstructions": null,
    "QuoteSpecialInstructions": null,
    "StatusLabelAction": "Updated",
    "URL1": null,
    "URL1Description": null,
    "URL2": null,
    "URL2Description": null,
    "InitialContact": null,
    "StatusLabelActionID": 2,
    "RepNumber": 174,
    "PrimaryContactNumber": 0,
    "IsVendor": true,
    "IsSubcontractor": true,
    "DoNotEmail": false,
    "Inactive": false
}

Create primary phone number for the account

POST /api/accounts/100/phonenumbers HTTP/1.1
Content-Type: application/json
Content-Length: 84
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9
{
    "Number": "(402)555-5555",
    "Location": "Main",
    "IsPrimary": true
}

Update account phone number

PUT /api/accounts/100/phonenumbers/1000 HTTP/1.1
Content-Type: application/json
Content-Length: 85
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9
{
    "Number": "(402)555-4444",
    "Location": "Main",
    "IsPrimary": false
}

Delete an account phone number

DELETE /api/accounts/100/phonenumbers?id=1000 HTTP/1.1
Content-Type: application/json
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9

Get Account Contacts

Returns a list of contact summaries related to the account.

GET /api/contacts/account/100 HTTP/1.1
Content-Type: application/json
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9

Search Contacts

POST /api/contacts/search/lastname HTTP/1.1
Content-Type: application/json
Content-Length: 9
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9
"*smith*"

Create a new contact

The following will create a new contact with an initial phone number and email address.

POST /api/contacts HTTP/1.1
Content-Type: application/json
Content-Length: 774
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9
{
    "Contact":
    {
        "AccountNumber":1052932,
        "Prefix": "Mr.",
        "FirstName": "John",
        "MiddleInitial": "M",
        "LastName": "Smith",
        "Title": "Tech",
        "Department": null,
        "Address1": "12345 Main St",
        "Address2": "Suite 1",
        "City": "Omaha",
        "State": "NE",
        "PostalCode": "68127",
        "Country": "USA",
        "PersonalNotes": "Primary technical contact",
        "LetterSalutation": "Mr.",
    },
    "PrimaryPhoneNumber": 
    {
	    "Number": "402-555-5555",
	    "Location": "Fax",
    },
    "PrimaryEmailAddress": 
    {
	    "Email": "jsmith@hse.com",
	    "Description": "Main",
	    "DoNotEmail": false
    },	
    "ModifiedByRepNumber": 2
}

Update contact

PUT /api/contacts HTTP/1.1
Content-Type: application/json
Content-Length: 425
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9
{
    "AccountNumber":1052932,
    "Prefix": "Mr.",
    "FirstName": "John",
    "MiddleInitial": "M",
    "LastName": "Peterson",
    "Title": "Tech",
    "Department": null,
    "Address1": "12345 Main St",
    "Address2": "Suite 123",
    "City": "Omaha",
    "State": "NE",
    "PostalCode": "68127",
    "Country": "USA",
    "PersonalNotes": "Primary technical contact",
    "LetterSalutation": "Mr.",
}

Create primary email address

POST /api/contacts/1000/emails HTTP/1.1
Content-Type: application/json
Content-Length: 112
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9
{
   "Email": "jsmith@hse.com",
   "Description": "Personal",
   "DoNotEmail": true,
   "IsPrimary": true
}

Update email address

PUT /api/contacts/1000/emails/1000 HTTP/1.1
Content-Type: application/json
Content-Length: 113
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9
{
   "Email": "jsmith@hse.com",
   "Description": "Personal",
   "DoNotEmail": true,
   "IsPrimary": false
}

Delete a contact email address

DELETE /api/contacts/1000/emails?id=1000 HTTP/1.1
Content-Type: application/json
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9

Get Account Quotes

Returns a list of quote summaries related to the account.

GET /api/quotes/account/100 HTTP/1.1
Content-Type: application/json
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9

Get Account Opportunities

Returns a list of opportunity summaries related to the account.

GET /api/opportunities/account/100 HTTP/1.1
Content-Type: application/json
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9

Get Account Service Orders

Returns a list of service order summaries related to the account.

GET /api/serviceorders/account/100 HTTP/1.1
Content-Type: application/json
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9

Service Orders

Search

POST /api/serviceorders/search/customfield HTTP/1.1
Content-Type: application/json
Content-Length: 79
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9
{
	"Category":"Service Orders",
	"Field":"ExtraInfo",
	"Criteria":"value"
}

Advanced Search

POST /api/accounts/search HTTP/1.1
Content-Type: application/json
Content-Length: 402
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9
{
  "Criteria": [
    {
      "MatchType" : "Contains",      
      "SearchType": "ItemID",
      "Criteria": "Hard Drive",
    },
    {
      "MatchType" : "Contains",      
      "SearchType": "ItemID",
      "Criteria": "HD",
    },
    {
      "MatchType" : "Contains",  
      "SearchType": "Symptom",
      "Criteria": "Disk",
    },     
  ],

"PageSize": 10

}

You can also use an asterik or percent sign as wildcard values in the Criteria instead of the MatchType property. For example "%smith%" or "*smith*".


Search time logs

POST /api/serviceorders/timelogs/search HTTP/1.1
Content-Type: application/json
Content-Length: 141
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9
{
    {
      "MatchType" : "Contains",      
      "SearchType": "LogReason",
      "Criteria": "Programming",
    }

"PageSize": 10

}

Summary

GET /api/serviceorders/100 HTTP/1.1
Content-Type: application/json
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9

Detail

GET /api/serviceorders/100/detail HTTP/1.1
Content-Type: application/json
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9

The BillToAddressType and ShipToAddressType properties allow you to tell Tigerpaw how you are going to set the address in the request.
Default - Use the BillTo or ShipTo address defined on the request.
PrimaryAlternate - Use the primary alternate billing or shipping address defined on the account.
AccountNumber - Use the bill to or ship to address of the specified account.
None - Clear an existing bill to or ship to address.

DateTimeRequested, DateTimeOpened and DateTimeClosed and VerifiedDate use the OptionalDateTime contract. This allows you to set or clear the value as needed. If the property is not provided it will be treated as a null or empty value.

    "DateTimeRequested":{} // same as no value or not including the property, use existing values
    "DateTimeRequested":{"DateTime":""} // used to clear an existing value
    "DateTimeRequested":{"DateTime":"2017-10-31T14:25:35"} // UTC date time will be converted to your local date and time before being saved

The DiscountType property allows you to tell Tigerpaw how you are going to specify the discount on the request.
Default - Keep the existing values
Percentage - Use with DiscountPercent to apply a percentage discount to the service order total.
Amount - Use with DiscountAmount to subtract the ammount from the service order total.
SellForPrice - Use with DiscountSellForPrice to enter a new total sell amount for all items.
MarginPercentage - Use with DiscountMarginPercent to apply a gross margin percentage to the total.
None - Clear any existing discount.

Create a service order.

POST /api/serviceorders HTTP/1.1
Content-Type: application/json
Content-Length: 146
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9
{
    "AccountNumber": 1000,
    "BriefDescription": "Technical support request",
    "DateTimeRequested":{"DateTime":"2017-10-31T14:25:35"},
    "BillToAddressType": "Default",
    "BillTo":{
        "Address1":"12345 Main St",
        "City":"Wilmington",
        "State":"NC",
        "PostalCode":"28403"
    }
}

Update an existing service order.
When updating a service order if the property is omitted from the request no change will be made to the existing value.

PUT /api/serviceorders/200 HTTP/1.1
Content-Type: application/json
Content-Length: 334
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9
{
    "DiscountType":"SellForPrice",
    "DiscountSellForPrice":1000.54,
    "ShipToAddressType":"Default",
    "ShipTo":{
	    "Name":"Dock",
	    "Address1":"12345 Main St",
	    "City":"Lincoln",
	    "State":"NE",
	    "PostalCode":"68521",
	    "ContactName":"John Smith",
	    "ContactPhone":"402-555-1111"
	    }
}

Create a managed print service order
Used to create a service order for a specific managed print device.

POST /api/serviceorders/managed/print HTTP/1.1
Content-Type: application/json
Content-Length: 362
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9
{
    "DeviceID": "A1234B9876,
    "ExternalTicketId":"1000000",
    "BriefDescription": "Black toner replacement",
    "DateTimeRequested":{"DateTime":"2017-10-31T14:25:35"},
    "ShipToAddressType": "Default",
    "ShipTo":{
        "Address1":"12345 Main St",
        "City":"Wilmington",
        "State":"NC",
        "PostalCode":"28403"
    }
}

Add a price book item as a part

POST /api/serviceorders/1000/parts HTTP/1.1
Content-Type: application/json
Content-Length: 97
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9
{
  "LineNumber": 1,
  "ItemId": "Seagate XY12345",
  "ItemDescription": "1 TB Hard Drive",
}

If the PriceBookItemNumber and the ItemId are specified the request will give the item number priority or the item id.
When adding a part if the LineNumber is omitted the part will be added to the end of the list.
ItemDescription overrides the price book description.

Add a non-stock item part

POST /api/serviceorders/1000/parts/nonstock HTTP/1.1
Content-Type: application/json
Content-Length: 97
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9
{
  "ItemId": "Seagate XY99999",
  "Type": "Material",
  "ItemDescription": "4 TB Hard Drive",
}

Type must be Material, Special or Labor.

Update a price book item part

PUT /api/serviceorders/1000/parts/1 HTTP/1.1
Content-Type: application/json
Content-Length: 66
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9
{
  "LineNumber": 10,
  "ItemDescription": "2 TB Hard Drive",
}

Update a non-stock part

PUT /api/serviceorders/1000/parts/nonstock/1 HTTP/1.1
Content-Type: application/json
Content-Length: 66
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9
{
  "LineNumber": 10,
  "ItemDescription": "10 TB Hard Drive",
}

Delete a part

DELETE /api/serviceorders/1000/parts/1 HTTP/1.1
Content-Type: application/json
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9

Add time log

POST /api/serviceorders/1000/timelogs HTTP/1.1
Content-Type: application/json
Content-Length: 218
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9
{
  "BillingOption": "ApplyToContract",
  "Tech": 1,
  "RateBasis": "Regular",
  "CopyCommentsIndicator": "DoNotCopy",
  "TimeToInvoice": "BillableHoursMinutes",
  "BillableHours": 1,
  "BillableMinutes": 30,
}

Valid billing option types are - InvoiceCustomer, ApplyToContract, ApplyToContractAndBillcustomer, DoNotInvoice.
Valid rate basis values are - Regular, Overtime, Premium, Standard, AccountDefault, PriceBook, FlatFee, Manual.The default value will be regular.
Valid copy indicator type values are - DoNotCopy,CopyWhenSaving,CopyWhenClosingLog.
Valid time to invoice type values are - BillableHoursMinutes, UtilizedTime, RoundedMinimumUtilizedtime, ActualTime, RoundedMinimumActualTime. The default value for this would be BillableHoursMinutes

Update a time log

PUT /api/serviceorders/1000/timelogs/1 HTTP/1.1
Content-Type: application/json
Content-Length: 134
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9
{
  "BillingOption": "DoNotInvoice",
  "TimeToInvoice": "BillableHoursMinutes",
  "BillableHours": 10,
  "BillableMinutes": 30,
}

Add an expense

POST /api/serviceorders/1000/expenses HTTP/1.1
Content-Type: application/json
Content-Length: 158
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9
{
  "ExpenseType": "Parking",
  "RepNumber": 10,
  "ExpensePaymentType": "Cash",
  "ExpenseDateTime": "2017-10-31T14:20:35",
  "ExpenseAmount": 12.50,
}

The DistanceType field accepts values DoNotChangeDistance, SetByEndOdometer, or SetByDistance.

Update an expense

PUT /api/serviceorders/1000/expenses/1 HTTP/1.1
Content-Type: application/json
Content-Length: 31
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9
{
  "ExpenseAmount": 10.50,
}

Time Entries

Advanced Search

POST /api/timeentries/search HTTP/1.1
Content-Type: application/json
Content-Length: 403
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9
{
  "Criteria": [
    {
      "MatchType" : "GreaterThan",      
      "SearchType": "StartDate",
      "Criteria": "01/01/2017",
    },
    {
      "MatchType" : "LessThan",      
      "SearchType": "StartDate",
      "Criteria": "06/01/2017",
    },
    {
      "MatchType" : "Equal",  
      "SearchType": "TechAssigned",
      "Criteria": "919",
    },     
  ],

"PageSize": 10

}

You can also use an asterik or percent sign as wildcard values in the Criteria instead of the MatchType property. For example "%smith%" or "*smith*".


Time Slips

Advanced Search

POST /api/timeslips/search HTTP/1.1
Content-Type: application/json
Content-Length: 403
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9
{
  "Criteria": [
    {
      "MatchType" : "GreaterThan",      
      "SearchType": "StartDate",
      "Criteria": "01/01/2017",
    },
    {
      "MatchType" : "LessThan",      
      "SearchType": "StartDate",
      "Criteria": "06/01/2017",
    },
    {
      "MatchType" : "Equal",  
      "SearchType": "TechAssigned",
      "Criteria": "919",
    },     
  ],

"PageSize": 10

}

You can also use an asterik or percent sign as wildcard values in the Criteria instead of the MatchType property. For example "%smith%" or "*smith*".


Add a time slip

POST /api/timeslips HTTP/1.1
Content-Type: application/json
Content-Length: 215
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9
{
  "BillingOption": "Business",
  "LogReason": "Support",
  "TechAssigned": 919,
  "LogComment": "Helped user replace cartridge",
  "StartDateTime": "10/31/2017T14:00",
  "EndDateTime": "10/31/2017T16:00",
}

Billing options for time slips are Business and Personal.


Update a time slip

PUT /api/timeslips/1 HTTP/1.1
Content-Type: application/json
Content-Length: 114
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9
{
  "BillingOption": "Business",
  "StartDateTime": "10/31/2017T14:00",
  "EndDateTime": "10/31/2017T15:00",
}

Detail

GET /api/timeslips/1 HTTP/1.1
Content-Type: application/json
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9

Quotes

Search

POST /api/quotes/search/itemid HTTP/1.1
Content-Type: application/json
Content-Length: 14
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9
"*hard drive*"

Advanced Search

POST /api/quotes/search HTTP/1.1
Content-Type: application/json
Content-Length: 276
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9
{
  "Criteria": [
    {
      "MatchType" : "Contains",      
      "SearchType": "ItemID",
      "Criteria": "Hard Drive",
    },
    {
      "MatchType" : "Contains",      
      "SearchType": "ItemID",
      "Criteria": "HD",
    },     
  ],

"PageSize": 10

}

You can also use an asterik or percent sign as wildcard values in the Criteria instead of the MatchType property. For example "%smith%" or "*smith*".


Summary

GET /api/quotes/100 HTTP/1.1
Content-Type: application/json
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9

Detail

GET /api/quotes/100/detail HTTP/1.1
Content-Type: application/json
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9

The BillToAddressType and ShipToAddressType properties allow you to tell Tigerpaw how you are going to set the address in the request.
Default - Use the BillTo or ShipTo address defined on the request.
PrimaryAlternate - Use the primary alternate billing or shipping address defined on the account.
AccountNumber - Use the bill to or ship to address of the specified account.
None - Clear an existing bill to or ship to address.

The DiscountType property allows you to tell Tigerpaw how you are going to specify the discount on the request.
Default - Keep the existing values
Percentage - Use with DiscountPercent to apply a percentage discount to the service order total.
Amount - Use with DiscountAmount to subtract the ammount from the service order total.
SellForPrice - Use with DiscountSellForPrice to enter a new total sell amount for all items.
MarginPercentage - Use with DiscountMarginPercent to apply a gross margin percentage to the total.
None - Clear any existing discount.

Create a quote.

POST /api/quotes HTTP/1.1
Content-Type: application/json
Content-Length: 270
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9
{
    "AccountNumber": 1000,
    "Description": "Sound system",
    "RepNumber":919,
    "BillToAddressType": "Default",
    "BillTo":{
        "Address1":"12345 Main St",
        "City":"Wilmington",
        "State":"NC",
        "PostalCode":"28403"
    }
}

Update an existing quote.
When updating a quote if the property is omitted from the request no change will be made to the existing value.

PUT /api/quotes/200 HTTP/1.1
Content-Type: application/json
Content-Length: 334
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9
{
    "DiscountType":"SellForPrice",
    "DiscountSellForPrice":1000.54,
    "ShipToAddressType":"Default",
    "ShipTo":{
	    "Name":"Dock",
	    "Address1":"12345 Main St",
	    "City":"Lincoln",
	    "State":"NE",
	    "PostalCode":"68521",
	    "ContactName":"John Smith",
	    "ContactPhone":"402-555-1111"
	    }
}

Duplicate an existing quote.

POST /api/quotes HTTP/1.1
Content-Type: application/json
Content-Length: 301
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9
{
    "AccountNumber": 1000,
    "ExistingQuoteNumber": 1,
    "Description": "Sound system",
    "RepNumber":919,
    "BillToAddressType": "Default",
    "BillTo":{
        "Address1":"12345 Main St",
        "City":"Wilmington",
        "State":"NC",
        "PostalCode":"28403"
    }
}

Add a price book item

POST /api/quotes/1000/detail/items/stock HTTP/1.1
Content-Type: application/json
Content-Length: 97
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9
{
  "LineNumber": 1,
  "ItemId": "Seagate XY12345",
  "ItemDescription": "1 TB Hard Drive",
}

If the PriceBookItemNumber and the ItemId are specified the request will give the item number priority or the item id.
When adding a part if the LineNumber is omitted the part will be added to the end of the list.
ItemDescription overrides the price book description.

Add a non-stock item

POST /api/quotes/1000/detail/items/nonstock HTTP/1.1
Content-Type: application/json
Content-Length: 100
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9
{
  "ItemId": "Seagate XY99999",
  "Type": "Material",
  "ItemDescription": "4 TB Hard Drive",
}

Type must be Material, Special or Labor.

Update an item

PUT /api/quotes/1000/details/items/1 HTTP/1.1
Content-Type: application/json
Content-Length: 66
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9
{
  "LineNumber": 10,
  "ItemDescription": "2 TB Hard Drive",
}

Delete a part

DELETE /api/quotes/1000/details/1 HTTP/1.1
Content-Type: application/json
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9

Opportunities

Search

POST /api/opportunities/search/name HTTP/1.1
Content-Type: application/json
Content-Length: 9
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9
"*sound*"

Advanced Search

POST /api/quotes/opportunities HTTP/1.1
Content-Type: application/json
Content-Length: 393
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9
{
  "Criteria": [
    {
      "MatchType" : "Contains",      
      "SearchType": "Name",
      "Criteria": "Sound",
    },
    {
      "MatchType" : "Contains",      
      "SearchType": "Name",
      "Criteria": "System",
    }, 
    {
      "MatchType" : "Contains",      
      "SearchType": "AccountName",
      "Criteria": "Hospital",
    },     
  ],

"PageSize": 10

}

You can also use an asterik or percent sign as wildcard values in the Criteria instead of the MatchType property. For example "%smith%" or "*smith*".


Summary

GET /api/opportunities/100 HTTP/1.1
Content-Type: application/json
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9

Detail

GET /api/opportunities/100/detail HTTP/1.1
Content-Type: application/json
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9

Create an opportunity.

POST /api/opportunities HTTP/1.1
Content-Type: application/json
Content-Length: 220
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9
{
	"Name": "Video Conferencing Equipment",
	"Status": "Open",
	"Source": "Radio",
	"StageID": 1,
	"ProbabilityPercent": 99,
	"Owner": 919,
	"AccountNumber": 1000,
	"EstimatedCloseDate": "2017-11-01T00:00:00",
 }

Update an existing opportunity.

PUT /api/opportunities/200 HTTP/1.1
Content-Type: application/json
Content-Length: 729
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9
{
      "Name": "Workstations",
      "Type": "Misc",
      "Status": "Open",
      "Source": "WebSite",
      "Notes": "Notes",
      "NextStep": "Call",
      "Competition": "None",
      "CloseReason": null,
      "Strategy": null,
      "HowDidYouHearAboutUs": "Google",
      "StageID": 0,
      "ProbabilityPercent": 7,
      "Owner": 919,
      "AccountNumber": 1000,
      "ContactNumber": 100,
      "Age": 10,
      "EstimatedCloseDate": "2015-03-20T00:00:00",
      "CloseDate": null,
      "NextDate": "2015-03-10T00:00:00",
      "LastStageChangeDate": "2015-03-10T00:00:00",
      "ExpectedAmount": 200,
      "BestCaseAmount": 300,
      "WorstCaseAmount": 0,
      "FinalQuoteAmount": 0
}

Price Book

Search

POST /api/pricebook/items/search/itemid HTTP/1.1
Content-Type: application/json
Content-Length: 17
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9
"*speaker*"

Active items only

POST /api/pricebook/items/search/itemid/true HTTP/1.1
Content-Type: application/json
Content-Length: 17
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9
"*speaker*"

Advanced Search

POST /api/pricebook/items HTTP/1.1
Content-Type: application/json
Content-Length: 399
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9
{
  "Criteria": [
    {
      "MatchType" : "Contains",      
      "SearchType": "ItemId",
      "Criteria": "Sound",
    },
    {
      "MatchType" : "Contains",      
      "SearchType": "ItemId",
      "Criteria": "System",
    }, 
    {
      "MatchType" : "Contains",      
      "SearchType": "ItemDescription",
      "Criteria": "System",
    },     
  ],

"PageSize": 10

}

You can also use an asterik or percent sign as wildcard values in the Criteria instead of the MatchType property. For example "%smith%" or "*smith*".


Summary

GET /api/pricebook/items/100 HTTP/1.1
Content-Type: application/json
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9

Detail

GET /api/pricebook/items/100/detail HTTP/1.1
Content-Type: application/json
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9

Create an item

POST /api/pricebook/items HTTP/1.1
Content-Type: application/json
Content-Length: 214
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9
{
  "ItemId": "1 TB Hard Drive",
  "Item": {
    "PartNumber": "XY1234",
    "ItemDescription": "Fast 1 TB Internal Hard Drive",
    "Type": "Material",
    "UnitOfMeasure": "EA",
    "BaseCost": 299.99,
 }

Update an existing price book item.

PUT /api/pricebook/items/200 HTTP/1.1
Content-Type: application/json
Content-Length: 218
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9
{
  "ItemId": "1 TB Hard Drive",
  "Item": {
    "PartNumber": "XY12345",
    "ItemDescription": "Fastest 1 TB Internal Hard Drive",
    "Type": "Material",
    "UnitOfMeasure": "EA",
    "BaseCost": 399.99,
 }

Assembly

POST /api/pricebook/items HTTP/1.1
Content-Type: application/json
Content-Length: 462
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9
{
  "ItemId": "1TB External Hard Drive Kit",
  "Item": {
    "ItemDescription": "Fast 1 TB External Hard Drive",
    "Type": "Assembly",
    "AssemblyType": "Closed",
    "UnitOfMeasure": "EA",
    "BaseCost": 500.50,
    "Assembly": [
    {
      "ItemId": "1 TB Hard Drive",
      "Quantity": 1,
      "PrintOnQuote": true
    },
    {
      "ItemId": "External Hard Drive Case",
      "Quantity": 1,
      "PrintOnQuote": true
    }
  ]
 }

Change assembly quantity

PUT /api/pricebook/items/100/assembly/details/10/quantity/5 HTTP/1.1
Content-Type: application/json
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9

Delete from the assembly

DELETE /api/pricebook/items/100/assembly/details/10 HTTP/1.1
Content-Type: application/json
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9

Contracts

Meter reading

POST /api/contracts/meters/readings HTTP/1.1
Content-Type: application/json
Content-Length: 139
Host: api.yourhost.com
Authorization: TSI MGu0OWM5NTQtMGE0My00NjM5LWJjYWEtZDNhMGE3YzM4NDg5OlNwS0syRjYvc2lEVzlQWUpTZlNQYmk4Y081bXVLdXYwVVNQY2J4dFpUdlE9
{
  "ContractMeterName": "Black And White",
  "DeviceId": "X1234ABC234567",
  "CurrentMeterReading": 527,
  "DateRead": "2017-11-01"
}