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. 

Endpointhttps://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.

Request example
https://orders-uat.objectlegal.com/api/v1/orders?pagination=true&length=1&start=0


Response example
{
  "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
}

back to top


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.

Endpointhttps://orders.objectlegal.com:443/api/v1/orders/{orderId}

Request example
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.


back to top


POST

Use this method to create a new order. 

Endpointhttps://orders.objectlegal.com:443/api/v1/orders

Request endpoint example
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.

Sample request body
{
  "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 example
{
    "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.


back to top


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.

Endpointhttps://orders.objectlegal.com:443/api/v1/orders/{orderId}

Request endpoint example
https://orders-uat.objectlegal.com:443/api/v1/orders/142027
Sample request body
{
"status_id": 2,
"expected_date": "04/02/2018",
"date_change_reason": "faster processing requested",
"service_level_id": 2
}
Response example
{
  "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": [  
  ]
}

back to top


DELETE

Use this method to delete an orderThe order ID must be included in the URL endpoint.

Endpointhttps://orders.objectlegal.com:443/api/v1/orders/{orderId}

Request example
https://orders-uat.objectlegal.com:443/api/v1/orders/142090
Response example
{
  "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"
}


back to top


POST Parameters

The table below lists the parameters that should be included in the body of a POST request.

ParameterTypeDescriptionRequired
descriptionstringDescribes the order. Can be a combination of company name, product, formation state, etc.Y
status_idintegerDefault value will be 1 indicating a new orderY
client_idintegerIdentifier for the client (that is, the account)Y
total_priceintegerThe sum of all products included in the orderY
service_level_idinteger

Indicates the speed of order processing.

1 - Standard

2 - Priority

NOTE: Priority processing is chargeable

Y
product_idinteger

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_idinteger

Identifies the package configured by Legalinc under which products belong

Contact your Legalinc Account Manager for the appropriate package_id.

Y
state_idinteger

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)arrayContact information for the orderY
company (see company)complexThe company being formed or the company for which the order is being madeY
notestringAny special notes for the orderN
order_contact
ParameterTypeDescriptionRequired
first_namestringFirst name of contact person responsible for the orderY
last_namestringLast name of contact person responsible for the orderY
contact_typestring

Possible values: Primary, Shipping, Billing

Y

addresses

(see order_contact:addresses)

complexPhysical addresses belonging to the contactsY

emails

(see order_contact:emails)

complexEmail addresses belonging to the contactsY

phones

(see order_contact:phones)

complexPhone numbers for the contactsN

back to top

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
ParameterTypeDescriptionRequired
address_typestring

Indicates the type of address for the order's contact person.
Note: This is dependent on the contact_type.

Possible values: Primary, Shipping, Billing

N
countrystringCountry of the order's contact person; defaults to US.N
addressstringStreet address of order's contact personY

address2

stringAdditional address infoN

city

stringCity of order's contact personY

state

stringState of order's contact personY
zipstringZip code of the order's contact personY


order_contact:emails
ParameterTypeDescriptionRequired
emailemail Email address for the order's contact person; must be in standard email format - email@email.com Y
email_typestring

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
ParameterTypeDescriptionRequired
numberphonePhone number belonging to the order's contact person N
phone_typestringIndicates type of phone for the order's contact personN


company
ParameterTypeDescriptionRequired
namestringName of companyY
company_typestringEntity type of company. For example, LLCN
client_idintegerIdentifies the client (that is, the account)Y

registered_state_id

integerIndicates the state where the registered agent service is requestedY

domestic_state_id

integerIndicates the domestic state of the company. Default is 9 which is DelawareN

fiscal_year

stringFiscal year of the company. Format is MM/DD. Default is 12/31Y
formation_onstringThe date on which the company was formedN
purposestring

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_descriptionstringInformation about the company and its purposeN
managed_bystringPerson who manages the companyN
address (see company:address)complexThe company's address informationY
company:address
ParameterTypeDescriptionRequired
addressstringFirst line of business addressY
address2stringSecond line of business addressN
citystringCity of business addressY

state

stringState of business addressY

zip

stringZip code of business addressY


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.

Response example
{
	"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.

back to top