Customers
Create A Customer
$ curl 'http://localhost:8080/customers' -i -X POST -H 'Content-Type: application/json' -H 'Accept: application/json' -d '{
"identifier" : "idOne",
"type" : "PERSON",
"givenName" : "Kima",
"middleName" : "Bessem",
"surname" : "Ray",
"dateOfBirth" : {
"year" : 2000,
"month" : 6,
"day" : 6
},
"member" : true,
"accountBeneficiary" : "Spouse",
"referenceCustomer" : "mate",
"assignedOffice" : "Oweh ViB",
"assignedEmployee" : "Che Godwin",
"address" : {
"street" : "Hospital",
"city" : "Muyuka",
"region" : "SWR",
"postalCode" : "8050",
"countryCode" : "CM",
"country" : "Cameroon"
},
"contactDetails" : [ {
"type" : "MOBILE",
"group" : "PRIVATE",
"value" : "677777777",
"preferenceLevel" : 1,
"validated" : false
}, {
"type" : "PHONE",
"group" : "BUSINESS",
"value" : "233363640",
"preferenceLevel" : 2,
"validated" : false
} ],
"currentState" : "PENDING",
"applicationDate" : "2017-07-19",
"lastModifiedBy" : "Nakuve",
"lastModifiedOn" : "2018-01-04"
}'
POST /customers HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Content-Length: 948
{
"identifier" : "idOne",
"type" : "PERSON",
"givenName" : "Kima",
"middleName" : "Bessem",
"surname" : "Ray",
"dateOfBirth" : {
"year" : 2000,
"month" : 6,
"day" : 6
},
"member" : true,
"accountBeneficiary" : "Spouse",
"referenceCustomer" : "mate",
"assignedOffice" : "Oweh ViB",
"assignedEmployee" : "Che Godwin",
"address" : {
"street" : "Hospital",
"city" : "Muyuka",
"region" : "SWR",
"postalCode" : "8050",
"countryCode" : "CM",
"country" : "Cameroon"
},
"contactDetails" : [ {
"type" : "MOBILE",
"group" : "PRIVATE",
"value" : "677777777",
"preferenceLevel" : 1,
"validated" : false
}, {
"type" : "PHONE",
"group" : "BUSINESS",
"value" : "233363640",
"preferenceLevel" : 2,
"validated" : false
} ],
"currentState" : "PENDING",
"applicationDate" : "2017-07-19",
"lastModifiedBy" : "Nakuve",
"lastModifiedOn" : "2018-01-04"
}
$ echo '{
"identifier" : "idOne",
"type" : "PERSON",
"givenName" : "Kima",
"middleName" : "Bessem",
"surname" : "Ray",
"dateOfBirth" : {
"year" : 2000,
"month" : 6,
"day" : 6
},
"member" : true,
"accountBeneficiary" : "Spouse",
"referenceCustomer" : "mate",
"assignedOffice" : "Oweh ViB",
"assignedEmployee" : "Che Godwin",
"address" : {
"street" : "Hospital",
"city" : "Muyuka",
"region" : "SWR",
"postalCode" : "8050",
"countryCode" : "CM",
"country" : "Cameroon"
},
"contactDetails" : [ {
"type" : "MOBILE",
"group" : "PRIVATE",
"value" : "677777777",
"preferenceLevel" : 1,
"validated" : false
}, {
"type" : "PHONE",
"group" : "BUSINESS",
"value" : "233363640",
"preferenceLevel" : 2,
"validated" : false
} ],
"currentState" : "PENDING",
"applicationDate" : "2017-07-19",
"lastModifiedBy" : "Nakuve",
"lastModifiedOn" : "2018-01-04"
}' | http POST 'http://localhost:8080/customers' 'Content-Type:application/json' 'Accept:application/json'
Path | Type | Description |
---|---|---|
|
|
The customer’s identifier |
|
|
The type of legal entity |
|
|
The customer’s given name |
|
|
The customer’s middle name |
|
|
The customer’s surname |
|
|
The customer’s date of birth |
|
|
Is customer a member of the MFI ? |
|
|
The customer’s assigned office |
|
|
The customer’s assigned employee |
|
|
The customer’s physical address |
|
|
The customer’s contact details |
|
|
The customer’s current state |
|
|
account beneficiary |
|
|
date customer applied for account |
|
|
employee who last modified account |
|
|
last time account was modified |
|
|
fellow customer to refer to |
HTTP/1.1 202 Accepted
Find A Customer
$ curl 'http://localhost:8080/customers/eniruth' -i -H 'Content-Type: application/json' -H 'Accept: */*'
GET /customers/eniruth HTTP/1.1
Content-Type: application/json
Accept: */*
Host: localhost:8080
$ http GET 'http://localhost:8080/customers/eniruth' 'Content-Type:application/json' 'Accept:*/*'
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 892
{
"identifier" : "eniruth",
"type" : "PERSON",
"givenName" : "Eni",
"middleName" : "Ruth",
"surname" : "Tah",
"dateOfBirth" : {
"year" : 1997,
"month" : 6,
"day" : 5
},
"member" : true,
"accountBeneficiary" : "Hubby",
"referenceCustomer" : "friend",
"assignedOffice" : "Bali ViB",
"assignedEmployee" : "Shu Dion",
"address" : {
"street" : "Che St",
"city" : "Bali",
"region" : "WC",
"postalCode" : "8050",
"countryCode" : "CM",
"country" : "Cameroon"
},
"contactDetails" : [ {
"type" : "MOBILE",
"group" : "PRIVATE",
"value" : "675673477",
"preferenceLevel" : 1,
"validated" : false
} ],
"currentState" : "PENDING",
"applicationDate" : "2018-01-04",
"customValues" : [ ],
"createdBy" : "maatkare",
"createdOn" : "2018-06-11T03:17:26.646Z",
"lastModifiedBy" : null,
"lastModifiedOn" : null
}
Path | Type | Description |
---|---|---|
|
|
The customer’s identifier |
|
|
The type of legal entity |
|
|
The customer’s given name |
|
|
The customer’s middle name |
|
|
The customer’s surName |
|
|
The customer’s date of birth |
|
|
Is customer a member of the MFI ? |
|
|
The customer’s assigned office |
|
|
The customer’s assigned employee |
|
|
The customer’s physical address |
|
|
The customer’s contact details |
|
|
The customer’s current state |
|
|
(Optional) The customer beneficiary |
|
|
(Optional) The customer’s reference |
|
|
(Optional) The date customer applied for account |
|
|
Some custom values |
|
|
User who created account |
|
|
Date and time when account was created |
|
|
(Optional) Employee who last modified account |
|
|
(Optional) Date and time account was last modified |
List Customers
$ curl 'http://localhost:8080/customers' -i -H 'Content-Type: application/json' -H 'Accept: */*'
GET /customers HTTP/1.1
Content-Type: application/json
Accept: */*
Host: localhost:8080
$ http GET 'http://localhost:8080/customers' 'Content-Type:application/json' 'Accept:*/*'
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 1402
{
"customers" : [ {
"identifier" : "bencho",
"type" : "PERSON",
"givenName" : "Bencho",
"middleName" : "Etah",
"surname" : "Obi",
"dateOfBirth" : {
"year" : 2000,
"month" : 6,
"day" : 6
},
"member" : true,
"accountBeneficiary" : "Spouse",
"referenceCustomer" : "mate",
"assignedOffice" : "Kah ViB",
"assignedEmployee" : "Ebot Tabi",
"address" : null,
"contactDetails" : null,
"currentState" : "PENDING",
"applicationDate" : "2017-04-10",
"customValues" : null,
"createdBy" : "maatkare",
"createdOn" : "2018-06-11T03:19:40.833Z",
"lastModifiedBy" : null,
"lastModifiedOn" : null
}, {
"identifier" : "meni",
"type" : "PERSON",
"givenName" : "Meni",
"middleName" : "Richmond",
"surname" : "Akom",
"dateOfBirth" : {
"year" : 1997,
"month" : 6,
"day" : 5
},
"member" : true,
"accountBeneficiary" : "Spouse",
"referenceCustomer" : "friend",
"assignedOffice" : "Buea ViB",
"assignedEmployee" : "Itoh Mih",
"address" : null,
"contactDetails" : null,
"currentState" : "PENDING",
"applicationDate" : "2018-02-18",
"customValues" : null,
"createdBy" : "maatkare",
"createdOn" : "2018-06-11T03:19:40.732Z",
"lastModifiedBy" : null,
"lastModifiedOn" : null
} ],
"totalPages" : 1,
"totalElements" : 2
}
Path | Type | Description |
---|---|---|
|
|
The List of Customers |
|
|
Number of pages |
|
|
Number of customers in page |
|
|
First customer’s identifier |
|
|
The type of first customer |
|
|
first customer’s given name |
|
|
first customer’s middle name |
|
|
first customer’s surName |
|
|
first customer’s date of birth |
|
|
Is customer a member of the MFI ? |
|
|
first customer’s assigned office |
|
|
first customer’s assigned employee |
|
|
first customer’s physical address |
|
|
first customer’s contact details |
|
|
first customer’s current state |
|
|
first customer’s beneficiary |
|
|
first customer’s reference |
|
|
The date first customer applied for account |
|
|
first customer’s custom values |
|
|
employee who created first customer’s account |
|
|
Date and time when first customer’s account was created |
|
|
Employee who last modified first customer’s account |
|
|
Date and time first customer’s account was last modified |
|
|
Second customer’s identifier |
|
|
The type of the second customer |
|
|
The second customer’s given name |
|
|
The second customer’s middle name |
|
|
The second customer’s surName |
|
|
The second customer’s date of birth |
|
|
Is second customer a member of the MFI ? |
|
|
The second customer’s assigned office |
|
|
The second customer’s assigned employee |
|
|
second customer’s physical address |
|
|
second customer’s contact details |
|
|
The second customer’s current state |
|
|
The second customer’s beneficiary |
|
|
The second customer’s reference |
|
|
The date second customer applied for account |
|
|
Second customer’s custom values |
|
|
User who created second customer’s account |
|
|
Date and time when second customer’s account was created |
|
|
Employee who last modified second customer’s account |
|
|
Date and time second customer’s account was last modified |
Update A Customer
$ curl 'http://localhost:8080/customers/tifuh' -i -X PUT -H 'Content-Type: application/json' -H 'Accept: application/json' -d '{
"identifier" : "tifuh",
"type" : "PERSON",
"givenName" : "Tifuh",
"middleName" : "Ndah",
"surname" : "Sih",
"dateOfBirth" : {
"year" : 1990,
"month" : 4,
"day" : 3
},
"member" : true,
"accountBeneficiary" : "Wife",
"referenceCustomer" : "sister",
"assignedOffice" : "Nkwen",
"assignedEmployee" : "Chi Tih",
"address" : {
"street" : "Sonac",
"city" : "Bamenda",
"region" : "NWR",
"postalCode" : "8050",
"countryCode" : "CM",
"country" : "Cameroon"
},
"contactDetails" : [ {
"type" : "MOBILE",
"group" : "PRIVATE",
"value" : "677665544",
"preferenceLevel" : 1,
"validated" : false
} ],
"currentState" : "PENDING",
"applicationDate" : "2017-09-06",
"customValues" : [ ],
"createdBy" : "maatkare",
"createdOn" : "2018-06-15T11:34:51.553Z",
"lastModifiedBy" : "maatkare",
"lastModifiedOn" : "2018-06-15T11:34:51.702Z"
}'
PUT /customers/tifuh HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Content-Length: 918
{
"identifier" : "tifuh",
"type" : "PERSON",
"givenName" : "Tifuh",
"middleName" : "Ndah",
"surname" : "Sih",
"dateOfBirth" : {
"year" : 1990,
"month" : 4,
"day" : 3
},
"member" : true,
"accountBeneficiary" : "Wife",
"referenceCustomer" : "sister",
"assignedOffice" : "Nkwen",
"assignedEmployee" : "Chi Tih",
"address" : {
"street" : "Sonac",
"city" : "Bamenda",
"region" : "NWR",
"postalCode" : "8050",
"countryCode" : "CM",
"country" : "Cameroon"
},
"contactDetails" : [ {
"type" : "MOBILE",
"group" : "PRIVATE",
"value" : "677665544",
"preferenceLevel" : 1,
"validated" : false
} ],
"currentState" : "PENDING",
"applicationDate" : "2017-09-06",
"customValues" : [ ],
"createdBy" : "maatkare",
"createdOn" : "2018-06-15T11:34:51.553Z",
"lastModifiedBy" : "maatkare",
"lastModifiedOn" : "2018-06-15T11:34:51.702Z"
}
$ echo '{
"identifier" : "tifuh",
"type" : "PERSON",
"givenName" : "Tifuh",
"middleName" : "Ndah",
"surname" : "Sih",
"dateOfBirth" : {
"year" : 1990,
"month" : 4,
"day" : 3
},
"member" : true,
"accountBeneficiary" : "Wife",
"referenceCustomer" : "sister",
"assignedOffice" : "Nkwen",
"assignedEmployee" : "Chi Tih",
"address" : {
"street" : "Sonac",
"city" : "Bamenda",
"region" : "NWR",
"postalCode" : "8050",
"countryCode" : "CM",
"country" : "Cameroon"
},
"contactDetails" : [ {
"type" : "MOBILE",
"group" : "PRIVATE",
"value" : "677665544",
"preferenceLevel" : 1,
"validated" : false
} ],
"currentState" : "PENDING",
"applicationDate" : "2017-09-06",
"customValues" : [ ],
"createdBy" : "maatkare",
"createdOn" : "2018-06-15T11:34:51.553Z",
"lastModifiedBy" : "maatkare",
"lastModifiedOn" : "2018-06-15T11:34:51.702Z"
}' | http PUT 'http://localhost:8080/customers/tifuh' 'Content-Type:application/json' 'Accept:application/json'
Path | Type | Description |
---|---|---|
|
|
The customer’s identifier |
|
|
The type of legal entity |
|
|
The customer’s given name |
|
|
The customer’s middle name |
|
|
The customer’s surname |
|
|
The customer’s date of birth |
|
|
Is customer a member of the MFI ? |
|
|
The customer’s assigned office |
|
|
The customer’s assigned employee |
|
|
The customer’s physical address |
|
|
The customer’s contact details |
|
|
The customer’s current state |
|
|
account beneficiary |
|
|
date customer applied for account |
|
|
Second customer’s custom values |
|
|
User who created second customer’s account |
|
|
Date and time when second customer’s account was created |
|
|
employee who last modified account |
|
|
last time account was modified |
|
|
fellow customer to refer to |
HTTP/1.1 202 Accepted
Activate A Client
$ curl 'http://localhost:8080/customers/bihade/commands' -i -X POST -H 'Content-Type: application/json' -H 'Accept: application/json' -d '{
"action" : "ACTIVATE",
"comment" : "Client Activated"
}'
POST /customers/bihade/commands HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Content-Length: 61
{
"action" : "ACTIVATE",
"comment" : "Client Activated"
}
$ echo '{
"action" : "ACTIVATE",
"comment" : "Client Activated"
}' | http POST 'http://localhost:8080/customers/bihade/commands' 'Content-Type:application/json' 'Accept:application/json'
Path | Type | Description |
---|---|---|
|
|
Action ACTIVATE |
|
|
Activate comment |
HTTP/1.1 202 Accepted
Lock A Client
$ curl 'http://localhost:8080/customers/bahtende/commands' -i -X POST -H 'Content-Type: application/json' -H 'Accept: application/json' -d '{
"action" : "LOCK",
"comment" : "Locked Client"
}'
POST /customers/bahtende/commands HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Content-Length: 54
{
"action" : "LOCK",
"comment" : "Locked Client"
}
$ echo '{
"action" : "LOCK",
"comment" : "Locked Client"
}' | http POST 'http://localhost:8080/customers/bahtende/commands' 'Content-Type:application/json' 'Accept:application/json'
Path | Type | Description |
---|---|---|
|
|
Action LOCK |
|
|
Lock comment |
HTTP/1.1 202 Accepted
Unlock A Client
$ curl 'http://localhost:8080/customers/pobum/commands' -i -X POST -H 'Content-Type: application/json' -H 'Accept: application/json' -d '{
"action" : "UNLOCK",
"comment" : "Client Unlocked"
}'
POST /customers/pobum/commands HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Content-Length: 58
{
"action" : "UNLOCK",
"comment" : "Client Unlocked"
}
$ echo '{
"action" : "UNLOCK",
"comment" : "Client Unlocked"
}' | http POST 'http://localhost:8080/customers/pobum/commands' 'Content-Type:application/json' 'Accept:application/json'
Path | Type | Description |
---|---|---|
|
|
Action UNLOCK |
|
|
Unlock comment |
HTTP/1.1 202 Accepted
Close A Client
$ curl 'http://localhost:8080/customers/epolle/commands' -i -X POST -H 'Content-Type: application/json' -H 'Accept: application/json' -d '{
"action" : "CLOSE",
"comment" : "Client Closed"
}'
POST /customers/epolle/commands HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Content-Length: 55
{
"action" : "CLOSE",
"comment" : "Client Closed"
}
$ echo '{
"action" : "CLOSE",
"comment" : "Client Closed"
}' | http POST 'http://localhost:8080/customers/epolle/commands' 'Content-Type:application/json' 'Accept:application/json'
Path | Type | Description |
---|---|---|
|
|
Action CLOSE |
|
|
Close comment |
HTTP/1.1 202 Accepted
Reopen A Client
$ curl 'http://localhost:8080/customers/eyolle/commands' -i -X POST -H 'Content-Type: application/json' -H 'Accept: application/json' -d '{
"action" : "REOPEN",
"comment" : "Reopened Client"
}'
POST /customers/eyolle/commands HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Content-Length: 58
{
"action" : "REOPEN",
"comment" : "Reopened Client"
}
$ echo '{
"action" : "REOPEN",
"comment" : "Reopened Client"
}' | http POST 'http://localhost:8080/customers/eyolle/commands' 'Content-Type:application/json' 'Accept:application/json'
Path | Type | Description |
---|---|---|
|
|
Action REOPEN |
|
|
Reopen comment |
HTTP/1.1 202 Accepted
List Client Commands
$ curl 'http://localhost:8080/customers/kumba/commands' -i -H 'Content-Type: application/json' -H 'Accept: */*'
GET /customers/kumba/commands HTTP/1.1
Content-Type: application/json
Accept: */*
Host: localhost:8080
$ http GET 'http://localhost:8080/customers/kumba/commands' 'Content-Type:application/json' 'Accept:*/*'
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 125
[ {
"action" : "ACTIVATE",
"comment" : "Test",
"createdOn" : "2018-06-11T03:33:08.077Z",
"createdBy" : "maatkare"
} ]
Path | Type | Description |
---|---|---|
|
|
A List of commands |
|
|
A comment |
|
|
Date and time customer was created |
|
|
Employee who created customer |
Update Customer’s Address
$ curl 'http://localhost:8080/customers/likumba/address' -i -X PUT -H 'Content-Type: application/json' -H 'Accept: application/json' -d '{
"street" : "Ombe Rd",
"city" : "Mutengene",
"region" : "SWR",
"postalCode" : "8050",
"countryCode" : "CM",
"country" : "Cameroon"
}'
PUT /customers/likumba/address HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Content-Length: 145
{
"street" : "Ombe Rd",
"city" : "Mutengene",
"region" : "SWR",
"postalCode" : "8050",
"countryCode" : "CM",
"country" : "Cameroon"
}
$ echo '{
"street" : "Ombe Rd",
"city" : "Mutengene",
"region" : "SWR",
"postalCode" : "8050",
"countryCode" : "CM",
"country" : "Cameroon"
}' | http PUT 'http://localhost:8080/customers/likumba/address' 'Content-Type:application/json' 'Accept:application/json'
Path | Type | Description |
---|---|---|
|
|
street |
|
|
city |
|
|
region |
|
|
postal code |
|
|
country code |
|
|
country |
HTTP/1.1 202 Accepted
Update Customer’s Details
$ curl 'http://localhost:8080/customers/kome/contact' -i -X PUT -H 'Content-Type: application/json' -H 'Accept: application/json' -d '[ {
"type" : "MOBILE",
"group" : "PRIVATE",
"value" : "666737666",
"preferenceLevel" : 2,
"validated" : false
}, {
"type" : "MOBILE",
"group" : "PRIVATE",
"value" : "677757564",
"preferenceLevel" : 1,
"validated" : true
} ]'
PUT /customers/kome/contact HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Content-Length: 243
[ {
"type" : "MOBILE",
"group" : "PRIVATE",
"value" : "666737666",
"preferenceLevel" : 2,
"validated" : false
}, {
"type" : "MOBILE",
"group" : "PRIVATE",
"value" : "677757564",
"preferenceLevel" : 1,
"validated" : true
} ]
$ echo '[ {
"type" : "MOBILE",
"group" : "PRIVATE",
"value" : "666737666",
"preferenceLevel" : 2,
"validated" : false
}, {
"type" : "MOBILE",
"group" : "PRIVATE",
"value" : "677757564",
"preferenceLevel" : 1,
"validated" : true
} ]' | http PUT 'http://localhost:8080/customers/kome/contact' 'Content-Type:application/json' 'Accept:application/json'
Path | Type | Description |
---|---|---|
|
|
The type of the first contact |
|
|
The group of the first contact |
|
|
first contact’s value |
|
|
Preference Level |
|
|
Is first contact validated ? |
|
|
The type of the second contact |
|
|
The Group of the second contact |
|
|
second contact’s value |
|
|
Preference Level |
|
|
Is second contact validated ? |
HTTP/1.1 202 Accepted
Upload Customer’s Portrait
$ curl 'http://localhost:8080/customers/ojong/portrait' -i -X POST -H 'Content-Type: multipart/form-data' -F 'portrait=@portrait.png;type=image/png'
$ http --form POST 'http://localhost:8080/customers/ojong/portrait' \
'portrait'@'portrait.png'
POST /customers/ojong/portrait HTTP/1.1
Content-Type: multipart/form-data; boundary=6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Host: localhost:8080
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=portrait
Content-Type: image/png
i don't care
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm--
HTTP/1.1 202 Accepted
Replace Customer’s Portrait
$ curl 'http://localhost:8080/customers/osong/portrait' -i -X POST -H 'Content-Type: multipart/form-data' -F 'portrait=@test.png;type=image/png'
$ http --form POST 'http://localhost:8080/customers/osong/portrait' \
'portrait'@'test.png'
POST /customers/osong/portrait HTTP/1.1
Content-Type: multipart/form-data; boundary=6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Host: localhost:8080
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm
Content-Disposition: form-data; name=portrait
Content-Type: image/png
i care
--6o2knFse3p53ty9dmcQvWAIx1zInP11uCfbm--
HTTP/1.1 202 Accepted
Delete Customer’s Portrait
$ curl 'http://localhost:8080/customers/shey/portrait' -i -X DELETE -H 'Accept: */*' -H 'Content-Type: application/json'
DELETE /customers/shey/portrait HTTP/1.1
Accept: */*
Content-Type: application/json
Host: localhost:8080
$ http DELETE 'http://localhost:8080/customers/shey/portrait' 'Accept:*/*' 'Content-Type:application/json'
HTTP/1.1 202 Accepted
Identification Cards
Create Identification Card
$ curl 'http://localhost:8080/customers/ejiks/identifications' -i -X POST -H 'Content-Type: application/json' -H 'Accept: application/json' -d '{
"type" : "National",
"number" : "SC10A1234567",
"expirationDate" : {
"year" : 2029,
"month" : 10,
"day" : 10
},
"issuer" : "National Security",
"createdBy" : "Ndop Ndop",
"createdOn" : "2018/10/10",
"lastModifiedBy" : "Cho Toh",
"lastModifiedOn" : "2018-06-11"
}'
POST /customers/ejiks/identifications HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Content-Length: 294
{
"type" : "National",
"number" : "SC10A1234567",
"expirationDate" : {
"year" : 2029,
"month" : 10,
"day" : 10
},
"issuer" : "National Security",
"createdBy" : "Ndop Ndop",
"createdOn" : "2018/10/10",
"lastModifiedBy" : "Cho Toh",
"lastModifiedOn" : "2018-06-11"
}
$ echo '{
"type" : "National",
"number" : "SC10A1234567",
"expirationDate" : {
"year" : 2029,
"month" : 10,
"day" : 10
},
"issuer" : "National Security",
"createdBy" : "Ndop Ndop",
"createdOn" : "2018/10/10",
"lastModifiedBy" : "Cho Toh",
"lastModifiedOn" : "2018-06-11"
}' | http POST 'http://localhost:8080/customers/ejiks/identifications' 'Content-Type:application/json' 'Accept:application/json'
Path | Type | Description |
---|---|---|
|
|
Type of identity card |
|
|
Identity card number |
|
|
expiry date of card |
|
|
Issuer of identity Card |
|
|
employee who created card |
|
|
date when card was created |
|
|
employee who last modified card |
|
|
last time card was modified |
HTTP/1.1 202 Accepted
Update Identification Card
$ curl 'http://localhost:8080/customers/zIRg8pb5/identifications/4OTnXX8Hg3sRPHDblHYftemgMOdB9n2p' -i -X PUT -H 'Content-Type: application/json' -H 'Accept: application/json' -d '{
"type" : "University",
"number" : "4OTnXX8Hg3sRPHDblHYftemgMOdB9n2p",
"expirationDate" : {
"year" : 2020,
"month" : 1,
"day" : 1
},
"issuer" : "UBuea"
}'
PUT /customers/zIRg8pb5/identifications/4OTnXX8Hg3sRPHDblHYftemgMOdB9n2p HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080
Content-Length: 176
{
"type" : "University",
"number" : "4OTnXX8Hg3sRPHDblHYftemgMOdB9n2p",
"expirationDate" : {
"year" : 2020,
"month" : 1,
"day" : 1
},
"issuer" : "UBuea"
}
$ echo '{
"type" : "University",
"number" : "4OTnXX8Hg3sRPHDblHYftemgMOdB9n2p",
"expirationDate" : {
"year" : 2020,
"month" : 1,
"day" : 1
},
"issuer" : "UBuea"
}' | http PUT 'http://localhost:8080/customers/zIRg8pb5/identifications/4OTnXX8Hg3sRPHDblHYftemgMOdB9n2p' 'Content-Type:application/json' 'Accept:application/json'
Path | Type | Description |
---|---|---|
|
|
Type of Identity card |
|
|
Identity card number |
|
|
expiry date of card |
|
|
Issuer of identity Card |
HTTP/1.1 202 Accepted
Fetch Identification Cards
$ curl 'http://localhost:8080/customers/ektcOHJc/identifications' -i -H 'Content-Type: application/json' -H 'Accept: */*'
$ http GET 'http://localhost:8080/customers/ektcOHJc/identifications' 'Content-Type:application/json' 'Accept:*/*'
GET /customers/ektcOHJc/identifications HTTP/1.1
Content-Type: application/json
Accept: */*
Host: localhost:8080
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 557
[ {
"type" : "National",
"number" : "07235388",
"expirationDate" : {
"year" : 2028,
"month" : 5,
"day" : 23
},
"issuer" : "NDNS",
"createdBy" : "maatkare",
"createdOn" : "2018-06-11T03:47:42.063Z",
"lastModifiedBy" : null,
"lastModifiedOn" : null
}, {
"type" : "University",
"number" : "SC10A123",
"expirationDate" : {
"year" : 2019,
"month" : 10,
"day" : 7
},
"issuer" : "UB",
"createdBy" : "maatkare",
"createdOn" : "2018-06-11T03:47:42.15Z",
"lastModifiedBy" : null,
"lastModifiedOn" : null
} ]
Path | Type | Description |
---|---|---|
|
|
type of first card |
|
|
Number on first card |
|
|
expiry date of first card |
|
|
issuer of first card |
|
|
creator of first card |
|
|
date of creation of first card |
|
|
employee who last modified first card |
|
|
date when first card was lastly modified |
|
|
type of second card |
|
|
Number of second card |
|
|
expiry date of second card |
|
|
issuer of second card |
|
|
creator of second card |
|
|
date of creation of second card |
|
|
employee who last modified second card |
|
|
date when second cards was lastly modified |
Delete Identification Card
$ curl 'http://localhost:8080/customers/ekolle/identifications/FET12345' -i -X DELETE -H 'Content-Type: application/json' -H 'Accept: */*'
DELETE /customers/ekolle/identifications/FET12345 HTTP/1.1
Content-Type: application/json
Accept: */*
Host: localhost:8080
$ http DELETE 'http://localhost:8080/customers/ekolle/identifications/FET12345' 'Content-Type:application/json' 'Accept:*/*'
HTTP/1.1 202 Accepted
Delete Identification Card With Scan
$ curl 'http://localhost:8080/customers/ana/identifications/FET20Z234/scans/myScan' -i -X DELETE -H 'Accept: */*' -H 'Content-Type: application/json'
DELETE /customers/ana/identifications/FET20Z234/scans/myScan HTTP/1.1
Accept: */*
Content-Type: application/json
Host: localhost:8080
$ http DELETE 'http://localhost:8080/customers/ana/identifications/FET20Z234/scans/myScan' 'Accept:*/*' 'Content-Type:application/json'
HTTP/1.1 202 Accepted
Fetch Identification Card Scans
$ curl 'http://localhost:8080/customers/ato'oh/identifications/CT13B0987/scans' -i -H 'Content-Type: application/json' -H 'Accept: */*' -d '[ {
"identifier" : "ScanOne",
"description" : "First Scan"
}, {
"identifier" : "ScanTwo",
"description" : "Second Scan"
}, {
"identifier" : "ScanThree",
"description" : "Three Scan"
} ]'
GET /customers/ato'oh/identifications/CT13B0987/scans HTTP/1.1
Content-Type: application/json
Accept: */*
Host: localhost:8080
Content-Length: 197
[ {
"identifier" : "ScanOne",
"description" : "First Scan"
}, {
"identifier" : "ScanTwo",
"description" : "Second Scan"
}, {
"identifier" : "ScanThree",
"description" : "Three Scan"
} ]
$ echo '[ {
"identifier" : "ScanOne",
"description" : "First Scan"
}, {
"identifier" : "ScanTwo",
"description" : "Second Scan"
}, {
"identifier" : "ScanThree",
"description" : "Three Scan"
} ]' | http GET 'http://localhost:8080/customers/ato'oh/identifications/CT13B0987/scans' 'Content-Type:application/json' 'Accept:*/*'
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 197
[ {
"identifier" : "ScanOne",
"description" : "First Scan"
}, {
"identifier" : "ScanTwo",
"description" : "Second Scan"
}, {
"identifier" : "ScanThree",
"description" : "Three Scan"
} ]
Path | Type | Description |
---|---|---|
|
|
First scan’s identifier |
|
|
First scan’s description |
|
|
Second scan’s identifier |
|
|
Second scan’s description |
|
|
Third scan’s identifier |
|
|
Third scan’s description |
Find Identification Card Scan
$ curl 'http://localhost:8080/customers/checko/identifications/SM23A4321/scans/soughtOut' -i -H 'Content-Type: application/json' -H 'Accept: */*' -d '{
"identifier" : "soughtOut",
"description" : "Found Scan"
}'
GET /customers/checko/identifications/SM23A4321/scans/soughtOut HTTP/1.1
Content-Type: application/json
Accept: */*
Host: localhost:8080
Content-Length: 64
{
"identifier" : "soughtOut",
"description" : "Found Scan"
}
$ echo '{
"identifier" : "soughtOut",
"description" : "Found Scan"
}' | http GET 'http://localhost:8080/customers/checko/identifications/SM23A4321/scans/soughtOut' 'Content-Type:application/json' 'Accept:*/*'
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 64
{
"identifier" : "soughtOut",
"description" : "Found Scan"
}
Path | Type | Description |
---|---|---|
|
|
scan’s identifier |
|
|
scan’s description |
Find Identification Card Scan With Image
$ curl 'http://localhost:8080/customers/akong/identifications/SC18C0999/scans/scanIdentity/image' -i -H 'Content-Type: application/json' -H 'Accept: */*' -d 'iCareAboutImage'
GET /customers/akong/identifications/SC18C0999/scans/scanIdentity/image HTTP/1.1
Content-Type: application/json
Accept: */*
Host: localhost:8080
Content-Length: 15
iCareAboutImage
$ echo 'iCareAboutImage' | http GET 'http://localhost:8080/customers/akong/identifications/SC18C0999/scans/scanIdentity/image' 'Content-Type:application/json' 'Accept:*/*'
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 15
iCareAboutImage
Delete Identification Card Scan
$ curl 'http://localhost:8080/customers/wabah/identifications/SC012A001/scans/justScan' -i -X DELETE -H 'Accept: */*' -H 'Content-Type: application/json'
DELETE /customers/wabah/identifications/SC012A001/scans/justScan HTTP/1.1
Accept: */*
Content-Type: application/json
Host: localhost:8080
$ http DELETE 'http://localhost:8080/customers/wabah/identifications/SC012A001/scans/justScan' 'Accept:*/*' 'Content-Type:application/json'
HTTP/1.1 202 Accepted