Orders
Orders
The Orders object is an array in the Legalinc REST API. This object contains the products and services that Legalinc customers are purchasing. If a customer wants to create an LLC company, for example, this is considered an order with Legalinc and the POST method using the Orders endpoint is used to create the order.
Refer to Order Items for more information on the details of each order inside the Orders array.
GET
This call returns all pending orders for the logged in user's client ID. This request can be used to retrieve orders submitted to date which are not completed or cancelled for the account. To retrieve the specific details for an order (ex. companies, contacts, users, owners, notes, system events, templates) you use the GET by OrderId method.
Endpoint: https://orders.objectlegal.com:443/api/v1/orders
The API supports pagination for orders, and you can limit the count of orders you want returned, as well as sort columns by certain values.
https://orders-uat.objectlegal.com/api/v1/orders?pagination=true&length=1&start=0
{ "user_information": { "id": 2332, "name": "Deanne" }, "data": [ { "id": 142258, "description": "NewCorp LLC Delaware", "client_id": 1000, "status_id": 1, "exception_id": null, "exception_date": null, "exception_follow_up_date": null, "irs_date": null, "start_date": null, "irs_follow_up_date": null, "cancelled_id": null, "cancelled_date": null, "package_price": 59, "total_price": 268, "affiliate_id": 0, "affiliate_source_code": "", "parent_company_id": 48052, "service_level_id": 1, "state_id": null, "foreign_id": null, "expected_date": "2018-04-30 20:38:01", "used_retail_price": 0, "expected_shipment_date": "2018-04-30 20:38:01", "shipped_date": null, "shipment_confirmation_sent": 0, "assigned_to": null, "placed_by": 2332, "status_updated_at": null, "created_at": "2018-04-10 20:38:01", "updated_at": "2018-04-11 17:14:17", "external_id": null, "sr_number": null, "order_source": "", "client": { "id": 1000, "name": "Bermuda" }, "state": null, "user": null, "service_level": { "id": 1, "name": "Standard" }, "exception": null, "status": { "id": 1, "status": "New", "status_order": 2, "action": "Reviewed", "customer_status": "In Process" }, "company": { "id": 48052, "name": "Smith Company", "registered_state_id": 9, "state": { "id": 9, "code": "DE" } }, "notes": [ ], "order_item": [ { "id": 177545, "order_id": 142258, "description": "Domestic LLC Filing", "order_item_type": "product", "rate_id": 1107665, "rate": { "id": 1107665, "type": "package" } }, { "id": 177547, "order_id": 142258, "description": "Delaware State LLC Fee", "order_item_type": "fee", "rate_id": 0, "rate": null }, { "id": 177549, "order_id": 142258, "description": "Test", "order_item_type": "product", "rate_id": 1114085, "rate": { "id": 1114085, "type": "addon" } } ] } ], "recordsTotal": 6, "recordsFiltered": 6, "draw": 0 }
GET (orderId)
This call allows you to retrieve the complete details of a specific order by its ID regardless of its status (ex. pending, completed, etc.). The order ID must be included in the endpoint.
Endpoint: https://orders.objectlegal.com:443/api/v1/orders/{orderId}
https://orders-uat.objectlegal.com:443/api/v1/orders/142027
{ "id": 142027, "description": "LLC Questionnaire ABC Company New Jersey", "client_id": 1000, "status_id": 1, "exception_id": null, "exception_date": null, "exception_follow_up_date": null, "irs_date": null, "start_date": null, "irs_follow_up_date": null, "cancelled_id": null, "cancelled_date": null, "package_price": 0, "total_price": 316, "affiliate_id": 0, "affiliate_source_code": "", "parent_company_id": 47832, "service_level_id": 1, "state_id": null, "foreign_id": null, "expected_date": "2018-04-04 16:01:21", "used_retail_price": 0, "expected_shipment_date": "2018-04-04 16:01:21", "shipped_date": null, "assigned_to": null, "placed_by": 2332, "status_updated_at": null, "created_at": "2018-03-23 16:01:21", "updated_at": "2018-03-23 16:01:21", "external_id": "", "sr_number": null, "order_source": "CRC", "company": {See Companies object }, "client": {See Client object }, "status": { "id": 1, "status": "New", "type": "filings", "status_order": 2, "created_at": "2016-09-01 16:31:19", "updated_at": "2017-06-08 11:39:26", "action": "Reviewed", "customer_status": "In Process", "description": "This order is currently being processed by our team of specialists." }, "service_level": { "id": 1, "name": "Standard", "description": "This is the Standard Service Level Description", "hours": 576, "created_at": "2015-12-01 20:07:17", "updated_at": "2015-12-01 20:07:17" }, "shipment": [ ], "order_item": [See Order Items object ], "payment": [ { "id": 3616, "order_id": 142027, "type": "credit", "payment_method_id": 0, "payment_number": 0, "charge_id": "ch_1C8sKWHNaqBKBuC7gnZ9T2AK", "amount_paid": 129, "payment_amount": 129, "approval_code": "", "merchant_id": 1, "created_at": "2018-03-23 16:01:25", "updated_at": "2018-03-23 16:01:25", "void_check": 0, "payment_type": "Inbound", "payable_to": null, "stripe_payment_type": null } ], "user": null, "exception": null, "contacts": [See Contacts object ], "notes": [ ], "document": [See Documents object ], "history": [ { "created_at": "03\/23\/2018 16:01:21", "old_status": "", "user": "", "new_status": "Order Created", "old_status_id": 0, "description": "Order has been placed successfully.", "new_status_id": "2018-03-23 16:01:21" } ], "newStartDate": "2018-03-29", "payable_to": "Treasurer, State of New Jersey", "invoice": [ ] }
This request returns documents for both the order and the company associated with the order. For example, if an order for an annual report filing is requested, this request may return a final packet for the order and a state notifications document for the associated company.
Company documents will have a documentable_id matching the company's id and they will not have an order_id associated with them when using the Documents GET (document ID) request. Order documents will have a documentable_id matching the order's id and an order_id associated with them when using the same Documents GET (document ID) request.
POST
Use this method to create a new order.
Endpoint: https://orders.objectlegal.com:443/api/v1/orders
https://orders-uat.objectlegal.com:443/api/v1/orders
The example below shows an LLC filing in NJ with the minimal amount of fields (required fields only). Payment details do not get passed in the POST for an order. The order is created first and then the Payments API is called to make payment. The order shown below will have a status of "In Process" in the Legalinc system until payment is made.
{ "description": "Smith LLC New Jersey", "status_id": 1, "client_id": "1000", "total_price": 1134, "service_level_id": "1", "product_id": "1,18", "package_id": 114, "state_id": 32, "order_contact": [ { "first_name": "John", "last_name": "Smith", "contact_type": "primary", "addresses": [ { "address_type": "primary", "country": "US", "address": "2 Prospect Ave", "address2": "", "city": "Montclair", "state": "NJ", "zip": "07042" } ], "emails": [ { "email": "j.smith@email.com", "email_type": "primary" } ], "phones": [ { "number": "973-736-1234", "phone_type": "primary" } ] } ], "company": { "name": "Smith Company", "company_type": "LLC", "client_id": "1000", "registered_state_id": "32", "domestic_state_id": 0, "fiscal_year": "12/31", "address": { "address": "52 Ridge Rd", "address2": "", "city": "West Orange", "state": "NJ", "zip": "07052" } }, "note": "This is a test order" }
{ "response": "", "message": "The requested operation successfully completed", "code": 200, "success": true }
See POST Parameters for the parameters that should be included for the successful creation of an order.
PUT
This method should be used with caution as updates to existing orders might interfere with the processing of an order at the administrative or even state level. This method is normally triggered by Order Manager.
The order ID must be included in the endpoint, and parameter values for the data to be updated must be in the body of the request.
Endpoint: https://orders.objectlegal.com:443/api/v1/orders/{orderId}
https://orders-uat.objectlegal.com:443/api/v1/orders/142027
{ "status_id": 2, "expected_date": "04/02/2018", "date_change_reason": "faster processing requested", "service_level_id": 2 }
{ "id": 142027, "description": "LLC Questionnaire ABC Company New Jersey", "client_id": 1000, "status_id": 2, "exception_id": null, "exception_date": null, "exception_follow_up_date": null, "irs_date": null, "start_date": null, "irs_follow_up_date": null, "cancelled_id": null, "cancelled_date": null, "package_price": 0, "total_price": 316, "affiliate_id": 0, "affiliate_source_code": "", "parent_company_id": 47832, "service_level_id": 2, "state_id": null, "foreign_id": null, "expected_date": "2018-04-02 07:00:00", "used_retail_price": 0, "expected_shipment_date": "2018-04-04 16:01:21", "shipped_date": null, "assigned_to": null, "placed_by": 2332, "status_updated_at": "2018-03-28 14:29:36", "created_at": "2018-03-23 16:01:21", "updated_at": "2018-03-28 14:29:36", "external_id": "", "sr_number": null, "order_source": "CRC", "client": {See Client object }, "company": {See Companies object }, "status": { "id": 2, "status": "Name Check", "type": "filings", "status_order": 3, "created_at": "2016-09-01 16:31:19", "updated_at": "2017-06-08 11:39:26", "action": "Checked", "customer_status": "In Process", "description": "This order is currently being processed by our team of specialists." }, "service_level": { "id": 2, "name": "Express", "description": "This is the Express Service Level Description", "hours": 288, "created_at": "2015-12-01 20:07:17", "updated_at": "2015-12-01 20:07:17" }, "shipment": [ ], "order_item": [See Order Items object ], "payment": { "id": 3616, "order_id": 142027, "type": "credit", "payment_method_id": 0, "payment_number": 0, "charge_id": "ch_1C8sKWHNaqBKBuC7gnZ9T2AK", "amount_paid": 129, "payment_amount": 129, "approval_code": "", "merchant_id": 1, "created_at": "2018-03-23 16:01:25", "updated_at": "2018-03-23 16:01:25", "void_check": 0, "payment_type": "Inbound", "payable_to": null, "stripe_payment_type": null }, "user": null, "exception": null, "contacts": [See Contacts object ], "notes": [ ], "document": [ ] }
DELETE
Use this method to delete an order. The order ID must be included in the URL endpoint.
Endpoint: https://orders.objectlegal.com:443/api/v1/orders/{orderId}
https://orders-uat.objectlegal.com:443/api/v1/orders/142090
{ "id": 142090, "description": "LLC Questionnaire DEF Company Delaware", "client_id": 1000, "status_id": 1, "exception_id": null, "exception_date": null, "exception_follow_up_date": null, "irs_date": null, "start_date": null, "irs_follow_up_date": null, "cancelled_id": null, "cancelled_date": null, "package_price": 0, "total_price": 256, "affiliate_id": 0, "affiliate_source_code": "", "parent_company_id": 47893, "service_level_id": 1, "state_id": null, "foreign_id": null, "expected_date": "2018-04-18 21:14:07", "used_retail_price": 0, "expected_shipment_date": "2018-04-18 21:14:07", "shipped_date": null, "shipment_confirmation_sent": 0, "assigned_to": null, "placed_by": 2332, "status_updated_at": null, "created_at": "2018-03-29 21:14:07", "updated_at": "2018-03-29 21:14:07", "external_id": "", "sr_number": null, "order_source": "CRC" }
POST Parameters
The table below lists the parameters that should be included in the body of a POST request.
Parameter | Type | Description | Required |
---|---|---|---|
description | string | Describes the order. Can be a combination of company name, product, formation state, etc. | Y |
status_id | integer | Default value will be 1 indicating a new order | Y |
client_id | integer | Identifier for the client (that is, the account) | Y |
total_price | integer | The sum of all products included in the order | Y |
service_level_id | integer | Indicates the speed of order processing. 1 - Standard 2 - Priority NOTE: Priority processing is chargeable | Y |
product_id | integer | Identifies the products or services being ordered. Use comma separated values. 1 - LLC 16 - EIN Obtainment 18 - Priority Processing 20 - Registered Agent Refer to the Product List for a full list of product_ids. | Y |
package_id | integer | Identifies the package configured by Legalinc under which products belong Contact your Legalinc Account Manager for the appropriate package_id. | Y |
state_id | integer | Identifies the state in which the LLC is placed Refer to the States object for a full list of State IDs. | Y |
order_contact (see order_contact) | array | Contact information for the order | Y |
company (see company) | complex | The company being formed or the company for which the order is being made | Y |
note | string | Any special notes for the order | N |
order_contact | |||
---|---|---|---|
Parameter | Type | Description | Required |
first_name | string | First name of contact person responsible for the order | Y |
last_name | string | Last name of contact person responsible for the order | Y |
contact_type | string | Possible values: Primary, Shipping, Billing | Y |
addresses (see order_contact:addresses) | complex | Physical addresses belonging to the contacts | Y |
emails (see order_contact:emails) | complex | Email addresses belonging to the contacts | Y |
phones (see order_contact:phones) | complex | Phone numbers for the contacts | N |
If contact information for the Shipping and Billing contacts is not provided, the primary contact's information is used. See Contacts for more details.
Please refer to the API Validation Documentation if 4XX errors are given during POST
order_contact:addresses | |||
---|---|---|---|
Parameter | Type | Description | Required |
address_type | string | Indicates the type of address for the order's contact person. Possible values: Primary, Shipping, Billing | N |
country | string | Country of the order's contact person; defaults to US. | N |
address | string | Street address of order's contact person | Y |
address2 | string | Additional address info | N |
city | string | City of order's contact person | Y |
state | string | State of order's contact person | Y |
zip | string | Zip code of the order's contact person | Y |
order_contact:emails | |||
---|---|---|---|
Parameter | Type | Description | Required |
Email address for the order's contact person; must be in standard email format - email@email.com | Y | ||
email_type | string | Indicates the type of email for the order's contact person. Note: This is dependent on the contact_type. Possible values: Primary, Shipping, Billing | N |
order_contact:phones | |||
---|---|---|---|
Parameter | Type | Description | Required |
number | phone | Phone number belonging to the order's contact person | N |
phone_type | string | Indicates type of phone for the order's contact person | N |
company | |||
---|---|---|---|
Parameter | Type | Description | Required |
name | string | Name of company | Y |
company_type | string | Entity type of company. For example, LLC | N |
client_id | integer | Identifies the client (that is, the account) | Y |
registered_state_id | integer | Indicates the state where the registered agent service is requested | Y |
domestic_state_id | integer | Indicates the domestic state of the company. Default is 9 which is Delaware | N |
fiscal_year | string | Fiscal year of the company. Format is MM/DD. Default is 12/31 | Y |
formation_on | string | The date on which the company was formed | N |
purpose | string | Industry the company is in. Each industry/purpose has an ID that has to be passed accordingly 1 - Real Estate 2 - Rental &Leasing 3 - Manufacturing 4 - Transportation & Warehouse 5 - Finance & Insurance | N |
purpose_description | string | Information about the company and its purpose | N |
managed_by | string | Person who manages the company | N |
address (see company:address) | complex | The company's address information | Y |
company:address | |||
---|---|---|---|
Parameter | Type | Description | Required |
address | string | First line of business address | Y |
address2 | string | Second line of business address | N |
city | string | City of business address | Y |
state | string | State of business address | Y |
zip | string | Zip code of business address | Y |
Company contacts can also be included but are not required. For more information on Company contacts and the parameters that should be included for them, refer to the Contacts object.
NAME CHECK
By default, the company name check will be disabled for this API.
Once the Name Availability API is implemented. Name Check can be enabled by setting the following flag in the payload.
{ "description": "Smith LLC New Jersey", "status_id": 1, "client_id": "1000", "total_price": 1134, "service_level_id": "1", "product_id": "1,18", "package_id": 114, "state_id": 32, "order_contact": [{ "first_name": "John", "last_name": "Smith", "contact_type": "primary", "addresses": [{ "address_type": "primary", "country": "US", "address": "2 Prospect Ave", "address2": "", "city": "Montclair", "state": "NJ", "zip": "07042" }], "emails": [{ "email": "j.smith@email.com", "email_type": "primary" }], "phones": [{ "number": "973-736-1234", "phone_type": "primary" }] }], "company": { "name": "Smith Company", "company_type": "LLC", "client_id": "1000", "registered_state_id": "32", "domestic_state_id": 0, "fiscal_year": "12/31", "address": { "address": "52 Ridge Rd", "address2": "", "city": "West Orange", "state": "NJ", "zip": "07052" } }, "note": "This is a test order", "order_details": { "enable_name_check": true } }
With Name Check enabled, the order can go through only if the name is available. Possible responses are found here.
HTTP Methods
Click on the links below for more details on the the following objects: