Skip to content
This repository was archived by the owner on Apr 23, 2021. It is now read-only.

Latest commit

 

History

History
146 lines (106 loc) · 4.42 KB

EmployeesApi.md

File metadata and controls

146 lines (106 loc) · 4.42 KB

Square.Connect.Api.EmployeesApi

All URIs are relative to https://connect.squareup.com

Method HTTP request Description
ListEmployees GET /v2/employees ListEmployees
RetrieveEmployee GET /v2/employees/{id} RetrieveEmployee

ListEmployees

ListEmployeesResponse ListEmployees (string locationId = null, string status = null, int? limit = null, string cursor = null)

ListEmployees

Example

using System;
using System.Diagnostics;
using Square.Connect.Api;
using Square.Connect.Client;
using Square.Connect.Model;

namespace Example
{
    public class ListEmployeesExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new EmployeesApi();
            var locationId = locationId_example;  // string | Filter employees returned to only those that are associated with the specified location. (optional) 
            var status = status_example;  // string | Specifies the EmployeeStatus to filter the employee by. (optional) 
            var limit = 56;  // int? | The number of employees to be returned on each page. (optional) 
            var cursor = cursor_example;  // string | The token required to retrieve the specified page of results. (optional) 

            try
            {
                // ListEmployees
                ListEmployeesResponse result = apiInstance.ListEmployees(locationId, status, limit, cursor);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling EmployeesApi.ListEmployees: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
locationId string Filter employees returned to only those that are associated with the specified location. [optional]
status string Specifies the EmployeeStatus to filter the employee by. [optional]
limit int? The number of employees to be returned on each page. [optional]
cursor string The token required to retrieve the specified page of results. [optional]

Return type

ListEmployeesResponse

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

RetrieveEmployee

RetrieveEmployeeResponse RetrieveEmployee (string id)

RetrieveEmployee

Example

using System;
using System.Diagnostics;
using Square.Connect.Api;
using Square.Connect.Client;
using Square.Connect.Model;

namespace Example
{
    public class RetrieveEmployeeExample
    {
        public void main()
        {
            
            // Configure OAuth2 access token for authorization: oauth2
            Configuration.Default.AccessToken = "YOUR_ACCESS_TOKEN";

            var apiInstance = new EmployeesApi();
            var id = id_example;  // string | UUID for the employee that was requested.

            try
            {
                // RetrieveEmployee
                RetrieveEmployeeResponse result = apiInstance.RetrieveEmployee(id);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling EmployeesApi.RetrieveEmployee: " + e.Message );
            }
        }
    }
}

Parameters

Name Type Description Notes
id string UUID for the employee that was requested.

Return type

RetrieveEmployeeResponse

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]