Apply to be an buyer
These endpoint are used to setup a new profile or create an application for new buyers.
The registration process involves the following steps:
- The applicant enters
Organization Id
andPhone Number
and / orRegistration Number
which is then posted to the applications endpoint. - If the applicant is not authorized to review, a list of reviewers are returned, from which the applicant chooses one and enters their phone number.
- The reviewer ID and phone number is posted to the reviewers endpoint.
- A SMS is sent to the entered phone number asking the reviewer to identify with their Electronic ID and approve the buyer.
- Finally an SMS is sent back to the applicant informing them that they've been approved as an buyer for the organization.
Initiate new applicationβ
This endpoint is used to request that a person is added as buyer to an organization. The list of reviewers contains both names and a unique ID. The names should be displayed to the applicant while the ID is used to identify which reviewer the applicant has chosen
- Request
- Response
POST /b2b/{{countryCode}}/applications HTTP/1.1
Host: api.uat.walleydev.com // (Please note! Different hostname in production)
Authorization: Bearer bXlVc2VybmFtZTpmN2E1ODA4MGQzZTk0M2VmNWYyMTZlMDE...
{
"organizationId": "2576102-5",
"applicantPhoneNumber": "+46073456789",
"applicantRegistrationNumber": "200110282381",
"firstName" : "John",
"lastName" : "Doe"
}
Status: 201 Created
/* Body */
{
"data": {
"applicationId": "933fb0ec-bdc0-4a40-b02d-e4205072e90c",
"organizationName": "Test Company Education Oy",
"reviewers": [
{
"name": "Test Name_B",
"id": "927f1ec3-90e5-4e5e-8dfc-ca5d3acd0464"
},
{
"name": "Test Name_A",
"id": "e12d1a09-8e11-4f0c-a4ed-ed98c0663a81"
}
],
"buyerStatus": "Inactive"
}
}
Request headersβ
Header | Required | Explanation |
---|---|---|
Authorization | Yes | Instructions on how to generate the Bearer token value can be found here |
Request pathβ
Path | Required | Explanation |
---|---|---|
countryCode | Yes | The country where the purchase is made. (SE, NO or FI) |
Request bodyβ
Phone number or Registration number is required.
Property | Required | Explanation | Type | Notes |
---|---|---|---|---|
organizationId | Yes | The company's organization ID | string | |
applicantPhoneNumber | No | Phone number to the person wanting to become a buyer | string | Include country code |
applicantRegistrationNumber | No | Registration number to the person wanting to become a buyer | string | Include country code |
firstName | No | First name of the applicant | string | |
lastName | No | Last name of the applicant | string |
Response bodyβ
Phone number or Registration number is required.
Property | Explanation | Type | Notes |
---|---|---|---|
applicationId | Unique id for the application, used in subsequentl calls | string | |
organizationName | The name of the organization | string | |
reviewers | List of people authorized to approve the application | array | |
buyerStatus | If Active the application has been automatically approved | string |
Choose reviewerβ
This endpoint is used to choose a reviewer that should approve the request. Here the application ID and reviewer ID from the response above is used to select a reviewer.
The phone number must include the country code eg. +46
.
If the applicant is an authorized signatory themselves the application is automatically approved.
This is indicated with buyerStatus=Active
in the response above. In that case there is no need to choose a reviewer with the request below, and the applicant can proceed to place a purchase directly.
- Request
- Response
POST /b2b/{{countryCode}}/applications/{{applicationId}}/reviewers HTTP/1.1
Host: api.uat.walleydev.com // (Please note! Different hostname in production)
Authorization: Bearer bXlVc2VybmFtZTpmN2E1ODA4MGQzZTk0M2VmNWYyMTZlMDE...
{
"reviewer": {
"reviewerId": "927f1ec3-90e5-4e5e-8dfc-ca5d3acd0464",
"phoneNumber": "+46123456789"
}
}
Status: 202 Accepted
/* No Body */
Request headersβ
Header | Required | Explanation |
---|---|---|
Authorization | Yes | Instructions on how to generate the Bearer token value can be found here |
Request pathβ
Path | Required | Explanation |
---|---|---|
countryCode | Yes | The country where the purchase is made. (SE, NO or FI) |
applicationId | Yes | A unique ID to identify a registration request |
Request bodyβ
Property | Required | Explanation | Type | Notes |
---|---|---|---|---|
reviewerId | Yes | Unique identifier for the reviewer | number | Received when creating the application |
phoneNumber | Yes | Phone number to the reviewer | number | Include country code |
Response codesβ
Http status code | Description |
---|---|
400 | Error, refer to returned problem details |
401 | Unauthorized, token verification needed. See: Authentication for more information |
403 | Permissions needed |
404 | Organization, application or reviewer not found |