Download OpenAPI specification:
Swile Integration API
Will list all WorkGroups or filter it if using any of the possible query params. Paginated request.
workgroupName | string |
branchDocument | string |
page required | integer <int32> >= 0 |
pageSize required | integer <int32> [ 1 .. 100 ] |
{- "workgroups": [
- {
- "idWorkGroup": 0,
- "name": "string",
- "description": "string",
- "branchName": "string",
- "branchDocument": "string",
- "branchIdentify": "string",
- "activeEmployees": 0,
- "cardTypes": [
- "string"
]
}
], - "totalPages": 0,
- "totalElements": 0,
- "last": true
}
Will create a new Workgroup with the received name and description
name required | string Name of the new workgroup |
description required | string Description of the new workgroup |
document | string(^\d{2}.\d{3}.\d{3}/\d{4}-\d{2}$) Document of the corporate where the workgroup will be created (if empty will create the workgroup attached to the logged account) |
{- "name": "Novo Grupo",
- "description": "Grupo para colaboradores que fazem x",
- "document": "11.111.111/0001-11"
}
{- "id": 0,
- "name": "string"
}
Updates one or more employee status.
status required | string Enum: "ACTIVE" "INACTIVE" "KEEP_ACTIVE" The employee status that will be used |
employeeIds required | Array of integers <int64> [ items <int64 > ] A list of the employee ids that will have the status changed |
{- "status": "ACTIVE",
- "employeeIds": [
- 0
]
}
{- "error": {
- "code": 40002,
- "type": "LIST_INACTIVE_EMPLOYEE_ERROR"
}, - "message": "Unable to list employees",
- "details": "Not able to list employees for id 123"
}
Will change the employee pin code, given that the current one is correct and that this employee is from this corporate
employeeId required | string Example: 123 The Employee's Id |
currentPin required | string = 4 characters Employee's current pin code |
newPin required | string = 4 characters Employee's new pin code |
{- "currentPin": "1234",
- "newPin": "4321"
}
{- "error": {
- "code": 40002,
- "type": "LIST_INACTIVE_EMPLOYEE_ERROR"
}, - "message": "Unable to list employees",
- "details": "Not able to list employees for id 123"
}
With the necessary data for the employee, plus the workgroup, will create anew employee for the corporate.
required | Array of objects (EmployeeRequest) The list of employees do add in your corporate |
{- "employees": [
- {
- "idWorkGroup": 1,
- "name": "João da Silva",
- "email": "email@email.com",
- "phoneNumber": "(99) 99999-9999",
- "document": "111.111.111-11",
- "externalId": "abc123",
- "birthDate": "1990-01-01"
}
]
}
{- "error": {
- "code": 40002,
- "type": "LIST_INACTIVE_EMPLOYEE_ERROR"
}, - "message": "Unable to list employees",
- "details": "Not able to list employees for id 123"
}
Updates one or more employee data. Should only send the value that you want modified.
employeeId required | integer <int64> |
idWorkGroup | integer <int64> Id of workgroup where the employee will be added |
name | string Employee's name |
string Employee's email | |
phoneNumber | string^\(?\d{2}\)?[\s.-]?\d{4,5}[\s.-]?\d{4}$ Employee's phone number |
document | string(^\d{3}\x2E\d{3}\x2E\d{3}\x2D\d{2}$) Employee's document |
externalId | string An optional identifier you can set for this employee |
birthDate | string <date> Employee's birth date |
{- "idWorkGroup": 1,
- "name": "João da Silva",
- "email": "email@email.com",
- "phoneNumber": "(99) 99999-9999",
- "document": "111.111.111-11",
- "externalId": "abc123",
- "birthDate": "1990-01-01"
}
{- "error": {
- "code": 40002,
- "type": "LIST_INACTIVE_EMPLOYEE_ERROR"
}, - "message": "Unable to list employees",
- "details": "Not able to list employees for id 123"
}
Will return a list of all employees. Will filter the result using the optional parameters, if none are used will just return all data. Response is paginated.
required | object (FindAllEmployeesRequest) |
{- "employees": [
- {
- "idEmployee": 0,
- "name": "string",
- "document": "string",
- "externalId": "string",
- "personalId": "string",
- "email": "string",
- "phoneNumber": "string",
- "birthDate": "2019-08-24",
- "status": "string",
- "activeApp": true,
- "idWorkGroup": 0,
- "workgroupName": "string",
- "dtChange": "2019-08-24T14:15:22Z",
- "updatedBy": "string"
}
], - "totalPages": 0,
- "totalElements": 0,
- "last": true
}
This API will return the inactive employees of a corporate. An inactive Employee is one that has not used their card for more than 90 days, but still has an 'ACTIVE' status. This is a pageable API that will return the requested employees page by page
page required | string >= 0 Example: page=0 This is the page we are request |
pageSize required | string [ 1 .. 300 ] Example: pageSize=100 This is the size of results in the page we want |
{- "employees": [
- {
- "document": "string",
- "email": "string",
- "idWorkGroup": 0,
- "phoneNumber": "string",
- "externalId": "string",
- "idEmployee": 0
}
], - "totalPages": 0,
- "totalElements": 0,
- "last": true
}
Will request cards to be delivered for employees
contactName required | string Name of the Employee Responsible for this Delivery |
contactPhone required | string^\(?\d{2}\)?[\s.-]?\d{4,5}[\s.-]?\d{4}$ Phone of the Employee Responsible for this Delivery |
contactEmail required | string E-mail of the Employee Responsible for this Delivery |
contactDocument required | string(^\d{3}\x2E\d{3}\x2E\d{3}\x2D\d{2}$) CPF of the Employee Responsible for this Delivery |
contactDept | string [ 0 .. 64 ] characters Department of the Employee Responsible for this Delivery |
contactExternalId | string External ID of the Employee Responsible for this Delivery |
delivered | boolean If this delivery should be created with status already delivered or not, defaults to false |
required | Array of objects (CreateShipmentEmployeeItem) [ 1 .. 2000 ] items The list of employees for the shipment |
{- "contactName": "Raquel Milena",
- "contactPhone": "(99) 99999-9999",
- "contactEmail": "email@email.com",
- "contactDocument": "111.111.111-11",
- "contactDept": "Recursos Humanos",
- "contactExternalId": "abc123",
- "delivered": false,
- "employees": [
- {
- "name": "João da Silva",
- "phoneNumber": "(99) 99999-9999",
- "email": "email@email.com",
- "document": "111.111.111-11",
- "externalId": "abc123",
- "dept": "Recursos Humanos",
- "address": {
- "postalCode": "01121-000",
- "buildingNumber": "966",
- "street": "Rua Prates",
- "neighborhood": "Bom Retiro",
- "city": "São Paulo",
- "state": "SP",
- "complement": "APTO 123"
}
}
]
}
{- "code": "string",
- "origin": "string",
- "type": "string",
- "corporateId": 0,
- "corporateDocument": "string",
- "corporateName": "string",
- "corporateSocialName": "string",
- "branchId": 0,
- "branchDocument": "string",
- "branchName": "string",
- "branchSocialName": "string",
- "contactName": "string",
- "contactPhone": "string",
- "contactEmail": "string",
- "contactDocument": "string",
- "contactDept": "string",
- "totalCardAmount": 0,
- "status": "string",
- "parcels": [
- {
- "code": "string",
- "logisticsProvider": "string",
- "status": "string",
- "cardAmount": 0,
- "valuePerCard": 0.1,
- "discount": 0.1,
- "actualValue": 0.1,
- "recipientName": "string",
- "recipientPhone": "string",
- "recipientEmail": "string",
- "recipientPostalCode": "string",
- "recipientStreet": "string",
- "recipientStreetNumber": "string",
- "recipientNeighborhood": "string",
- "recipientCity": "string",
- "recipientState": "string",
- "recipientDocument": "string",
- "notifyRecipient": true,
- "createdTs": "string",
- "updatedTs": "string"
}
], - "createdTs": "string",
- "updatedTs": "string"
}
Will return information about a parcel given its code
code required | string |
{- "code": "string",
- "status": "string",
- "recipientName": "string",
- "recipientPhone": "string",
- "recipientEmail": "string",
- "recipientPostalCode": "string",
- "recipientStreet": "string",
- "recipientStreetNumber": "string",
- "recipientNeighborhood": "string",
- "recipientCity": "string",
- "recipientState": "string",
- "recipientComplement": "string",
- "recipientDocument": "string",
- "notifyRecipient": true,
- "createdTs": "2019-08-24T14:15:22Z",
- "updatedTs": "2019-08-24T14:15:22Z"
}
Given an username and password using Basic Authentication, will return a JWT token that is necessary to use in all other APIs.
Authorization required | string |
{- "token": "string",
- "issuedAt": "2019-08-24T14:15:22Z",
- "expiresAt": "2019-08-24T14:15:22Z"
}
Creates a summary of an Order request, can be used for review, and returns the 'summaryId' field necessary to create the order
required | Array of objects (OrderSummaryData) The list of employees and the value to be requested for each type of card/wallet |
{- "data": [
- {
- "document": "111.111.111-11",
- "cardValues": [
- {
- "card": "v4",
- "value": 200
}
]
}
]
}
{- "orderGroupId": 0,
- "orderGroupCode": "string",
- "payerDocument": "string",
- "payerName": "string",
- "valueCredit": 0,
- "valuePayment": 0,
- "valueDiscount": 0,
- "valueFee": 0,
- "totalEmployees": 0,
- "summaryId": "string",
- "orders": [
- {
- "orderId": 0,
- "orderCode": "string",
- "payerDocument": "string",
- "payerName": "string",
- "valueCredit": 0,
- "valuePayment": 0,
- "valueDiscount": 0,
- "adminBalanceToUse": 0,
- "totalSubOrderItems": 0,
- "creationOrderType": "string",
- "campaign": true,
- "employees": [
- {
- "id": 0,
- "document": "string",
- "name": "string",
- "externalId": "string",
- "group": "string",
- "branchDocument": "string",
- "branchName": "string",
- "cardValue": {
- "property1": 0,
- "property2": 0
}
}
], - "typeList": [
- {
- "code": "string",
- "description": "string",
- "totalAmount": 0
}
]
}
]
}
Creates an Order. Since it is asynchronously, a confirmation is necessary, in this case find Order Status endpoint should be used.
summaryId required | string The Summary ID related to the Order data |
paymentMethod required | string Enum: "PIX" "BANK_SLIP" "WIRE_TRANSFER" The payment method for the order |
externalId | string An optional external ID to make easier to link the order |
creditDate required | string <date-time> Credit date, in which money will be transferred to employees |
benefitPayerDocument | string Branch document, if informed, the benefit orders will be grouped for that branch |
campaignPayerDocument | string Branch document, if informed, the campaign orders will be grouped for that branch |
Array of objects (ExtraPaymentInfo) Benefit extra payment information, used to inform swile credit and invoice text to specific order by document | |
Array of objects (ExtraPaymentInfo) Campaign extra payment information, used to inform swile credit and invoice text to specific order by document |
{- "summaryId": "string",
- "paymentMethod": "PIX",
- "externalId": "string",
- "creditDate": "2019-08-24T14:15:22Z",
- "benefitPayerDocument": "string",
- "campaignPayerDocument": "string",
- "benefitPaymentInfo": [
- {
- "document": "string",
- "invoiceText": "string",
- "swileCreditToUse": 0
}
], - "campaignPaymentInfo": [
- {
- "document": "string",
- "invoiceText": "string",
- "swileCreditToUse": 0
}
]
}
{- "summaryId": "string",
- "orderGroupId": 0,
- "orderGroupCode": "string",
- "externalId": "string",
- "status": "string",
- "rejectReason": "string"
}
List Order Group with internal orders divided by branches
code | string |
initialDate | string <date-time> |
finalDate | string <date-time> |
status | string |
page | integer <int32> >= 0 |
size | integer <int32> [ 1 .. 100 ] |
{- "orderGroups": [
- {
- "groupCode": "string",
- "valueCredit": 0,
- "valuePayment": 0,
- "discountValue": 0,
- "requestDate": "2019-08-24T14:15:22Z",
- "statusCode": "string",
- "totalEmployees": 0,
- "orders": [
- {
- "orderCode": "string",
- "document": "string",
- "valueCredit": 0,
- "valuePayment": 0,
- "swileCreditUsed": 0,
- "creditDate": "2019-08-24T14:15:22Z",
- "dueDate": "2019-08-24T14:15:22Z",
- "statusCode": "string",
- "totalEmployees": 0,
- "invoiceLink": "string",
- "slipLink": "string"
}
]
}
], - "totalPages": 0,
- "totalElements": 0,
- "last": true
}
Returns the OrderGroup detailed with the inner Orders values
orderGroupCode required | string |
{- "code": "string",
- "creationDate": "2019-08-24T14:15:22Z",
- "creditDate": "2019-08-24T14:15:22Z",
- "totalEmployees": 0,
- "statusCode": "string",
- "orderList": [
- {
- "code": "string",
- "totalValue": 0,
- "paymentValue": 0,
- "discountValue": 0,
- "swileCreditUsed": 0,
- "administrativeFee": 0,
- "category": "string",
- "products": {
- "property1": 0,
- "property2": 0
}, - "totalEmployees": 0,
- "document": "string",
- "creditDate": "2019-08-24T14:15:22Z",
- "dueDate": "2019-08-24T14:15:22Z",
- "statusCode": "string",
- "invoiceLink": "string",
- "slipLink": "string",
- "employeeList": [
- {
- "name": "string",
- "email": "string",
- "document": "string",
- "externalId": "string",
- "status": "string",
- "workgroupName": "string",
- "items": {
- "property1": 0,
- "property2": 0
}
}
]
}
]
}
Returns the status of the OrderGroup. Recommended to use after asynchronous creation to know if it succeeded or failed.
orderGroupCode required | string |
{- "summaryId": "string",
- "orderGroupId": 0,
- "orderGroupCode": "string",
- "externalId": "string",
- "status": "string",
- "rejectReason": "string"
}