REST APIs with JSON

  • Introduction

  • Overview

  • Authentication

  • Status and Error Codes

  • Exploring the APIs

Introduction

Wired Client APIs (Application Programming Interfaces) can be used by third-party CRM systems to transfer and manage staff or client records in the Wired Client system.

Overview

REST stands for Representational State Transfer. It is an architectural style for developing web services. The term REST API is used here to refer to an API accessed via HTTP protocol at a predefined set of system URLs.

Wired Client provides two separate REST APIs for programmatically adding staff or clients into the system, or updating existing staff or clients in the system.

JSON stands for JavaScript Object Notation which is an open standard file format. As a language-independent data format, JSON is used to return any information or content here.

Authentication

Both an API key and corresponding API password are required when calling Wired Client APIs. Please contact your software provider for getting your API key and API password.

Status and Error Codes

The HTTP status code 200 will be returned to confirm communication works normally. Any status or error codes will be pushed down into the HTTP response.

One of the following status codes will be returned in a JSON payload,

  • ‘0’ - Success

  • ‘1001’ - Invalid business account number

  • ‘1002’ - Invalid branch account number

  • ‘1003’ - Deleted staff ID

  • ‘1004’ - Deleted next appointment staff ID

  • ‘1005’ – Existing mobile number

  • ‘2000’ – Failed for any other reason

  • ‘2001’ - Invalid staff ID

  • ‘2002’ - Invalid next appointment staff ID

Exploring the APIs

  1. Add or Update Staff

    URI: https://app.thewiredclient.com/api/v1/staff

    Protocol: Post

    Header: Content-Type application/json

    Request body:

    {

    api_key: It is used to identify different third-party systems or different developers. It has UUID (Universally Unique Identifier) attribute and will be provided by your software provider. (mandatory)

    pi_password: It is used for authentication to gain access to API resource. It has UUID attribute and will be provided by your software provider. (mandatory)

    account_number: It is used to identify different business accounts. It has UUID attribute and will be created and provided by your software provider. (mandatory)

    id: It is used to identify and update an existing staff, or create a new staff when this is specified as 0 or null. (mandatory)

    staff_type: The default type is “User” when no value is specified. The value can be set to 2 as Power User, 3 as User, or 4 as Coordinator (optional)

    job_title: (optional)

    job_description: (optional)

    first_name: (mandatory)

    last_name: (mandatory)

    main_phone: (optional)

    mobile_phone1: SMS number (optional)

    email_address1: (mandatory)

    street: (optional)

    city: (optional)

    region: Region, State, or Province (optional)

    postal_code: (optional)

    country: (optional)

    }

    Response with status 200:

    {

    id: New or existing staff ID when success, or ‘0’ when failed,

    status: Refer to the section ‘Status and Error Codes’,

    message: Provide help information such as ‘Inserted one staff’ or so,

    }

  2. Add or Update Client

    URI: https://app.thewiredclient.com/api/v1/client

    Protocol: Post

    Header: Content-Type application/json

    Request body:

    {

    api_key: It is used to identify different third-party systems or different developers. It has UUID attribute and will be provided by Your software provider. (mandatory)

    api_password: It is used for authentication to gain access to API resource. It has UUID attribute and will be provided by Your software provider. (mandatory)

    account_number: It is used to identify different branches. It has UUID attribute and will be created and provided by Your software provider. (mandatory)

    id: It is used to identify and update an existing client, or create a new client when this is specified as 0 or null. (mandatory)

    first_name: (mandatory)

    last_name: (mandatory)

    staff_id #: It is used to identify the associated staff. It is created and retrieved when adding new staff via API. (optional)

    client_type: The default type is “Active Client” when no value is specified. It can be set to 1 as Lead type, 2 as Active Client type, or 3 as Inactive Client type (mandatory)

    gender: The default type is “Rather not say” when no value is specified. It can be set to 1 as Female, 2 as Male, 3 as Other, or 4 as Rather not say (mandatory)

    birthday: Use the format "YYYY-MM-DD” (optional)

    guardian: The default type is False, and it can be set to True or False (optional)

    guardian_first_name: (optional)

    guardian_last_name: (optional)

    mobile_phone1: SMS number (mandatory)

    email_address1: (optional)

    street: (optional)

    city: (optional)

    region: Region, State, or Province (optional)

    postal_code: (optional)

    country: (optional)

    reason: (optional)

    start_date: Use the format "YYYY-MM-DD” (optional or mandatory for Active and Inactive Clients)

    end_date: Use the format "YYYY-MM-DD” (optional)

    last_visit_date: Use the format "YYYY-MM-DD” (optional)

    opted_in_date: Use the format "YYYY-MM-DD” (optional)

    contact_method: The default method is “No Contact” when no value is specified. It can be set to 1 as SMS, 3 as Phone Call, or 0 as No Contact (mandatory)

    next_appointment_staff_id #: It is used to identify the staff in charge for next appointment. It is created and retrieved when adding new staff via API. (optional)

    next_appointment_date: Use the format "YYYY-MM-DD” (optional)

    next_appointment_time: Use the format "YYYY-MM-DDTHH:mm:ss” (optional)

    last_cancelled_date: Use the format "YYYY-MM-DD” (optional)

    number_of_visits: (optional)

    }

    Response with status 200:

    {

    id: New or existing client ID when success, or ‘0’ when failed,

    status: Refer to the section ‘Status and Error Codes’,

    message: Provide help information such as ‘Inserted one client’ or so,

    }

Wired Client APIs (Application Programming Interfaces) can be used by third-party CRM systems to transfer and manage staff or client records in the Wired Client system.

REST stands for Representational State Transfer. It is an architectural style for developing web services. The term REST API is used here to refer to an API accessed via HTTP protocol at a predefined set of system URLs.

Both an API key and corresponding API password are required when calling Wired Client APIs. Please contact your software provider for getting your API key and API password.

The HTTP status code 200 will be returned to confirm communication works normally. Any status or error codes will be pushed down into the HTTP response.

One of the following status codes will be returned in a JSON payload,

  • ‘0’ - Success

  • ‘1001’ - Invalid business account number

  • ‘1002’ - Invalid branch account number

  • ‘1003’ - Deleted staff ID

  • ‘1004’ - Deleted next appointment staff ID

  • ‘1005’ – Existing mobile number

  • ‘2000’ – Failed for any other reason

  • ‘2001’ - Invalid staff ID

  • ‘2002’ - Invalid next appointment staff ID

  1. Add or Update Staff

    URI: https://app.thewiredclient.com/api/v1/staff

    Protocol: Post

    Header: Content-Type application/json

    Request body:

    {

    api_key: It is used to identify different third-party systems or different developers. It has UUID (Universally Unique Identifier) attribute and will be provided by your software provider. (mandatory)

    pi_password: It is used for authentication to gain access to API resource. It has UUID attribute and will be provided by your software provider. (mandatory)

    account_number: It is used to identify different business accounts. It has UUID attribute and will be created and provided by your software provider. (mandatory)

    id: It is used to identify and update an existing staff, or create a new staff when this is specified as 0 or null. (mandatory)

    staff_type: The default type is “User” when no value is specified. The value can be set to 2 as Power User, 3 as User, or 4 as Coordinator (optional)

    job_title: (optional)

    job_description: (optional)

    first_name: (mandatory)

    last_name: (mandatory)

    main_phone: (optional)

    mobile_phone1: SMS number (optional)

    email_address1: (mandatory)

    street: (optional)

    city: (optional)

    region: Region, State, or Province (optional)

    postal_code: (optional)

    country: (optional)

    }

    Response with status 200:

    {

    id: New or existing staff ID when success, or ‘0’ when failed,

    status: Refer to the section ‘Status and Error Codes’,

    message: Provide help information such as ‘Inserted one staff’ or so,

    }

  2. Add or Update Client

    URI: https://app.thewiredclient.com/api/v1/client

    Protocol:Post

    Header: Content-Type application/json

    Request body:

    {

    api_key: It is used to identify different third-party systems or different developers. It has UUID attribute and will be provided by Your software provider. (mandatory)

    api_password: It is used for authentication to gain access to API resource. It has UUID attribute and will be provided by Your software provider. (mandatory)

    account_number: It is used to identify different branches. It has UUID attribute and will be created and provided by Your software provider. (mandatory)

    id: It is used to identify and update an existing client, or create a new client when this is specified as 0 or null. (mandatory)

    first_name: (mandatory)

    last_name: (mandatory)

    staff_id #: It is used to identify the associated staff. It is created and retrieved when adding new staff via API. (optional)

    client_type: The default type is “Active Client” when no value is specified. It can be set to 1 as Lead type, 2 as Active Client type, or 3 as Inactive Client type (mandatory)

    gender: The default type is “Rather not say” when no value is specified. It can be set to 1 as Female, 2 as Male, 3 as Other, or 4 as Rather not say (mandatory)

    birthday: Use the format "YYYY-MM-DD” (optional)

    guardian: The default type is False, and it can be set to True or False (optional)

    guardian_first_name: (optional)

    guardian_last_name: (optional)

    mobile_phone1: SMS number (mandatory)

    email_address1: (optional)

    street: (optional)

    city: (optional)

    region: Region, State, or Province (optional)

    postal_code: (optional)

    country: (optional)

    reason: (optional)

    start_date: Use the format "YYYY-MM-DD” (optional or mandatory for Active and Inactive Clients)

    end_date: Use the format "YYYY-MM-DD” (optional)

    last_visit_date: Use the format "YYYY-MM-DD” (optional)

    opted_in_date: Use the format "YYYY-MM-DD” (optional)

    contact_method: The default method is “No Contact” when no value is specified. It can be set to 1 as SMS, 3 as Phone Call, or 0 as No Contact (mandatory)

    next_appointment_staff_id #: It is used to identify the staff in charge for next appointment. It is created and retrieved when adding new staff via API. (optional)

    next_appointment_date: Use the format "YYYY-MM-DD” (optional)

    next_appointment_time: Use the format "YYYY-MM-DDTHH:mm:ss” (optional)

    last_cancelled_date: Use the format "YYYY-MM-DD” (optional)

    number_of_visits: (optional)

    }

    Response with status 200:

    {

    id: New or existing client ID when success, or ‘0’ when failed,

    status: Refer to the section ‘Status and Error Codes’,

    message: Provide help information such as ‘Inserted one client’ or so,

    }

Contact Us

Need Help ?

Need a hand with Wired Client? Please fill out the form below to get in touch with our helpdesk:

Book a Demo

Would you like to see Wired Client in action? Please fill out the form below to schedule a live one-on-one demo with a representative: