Skip to content

MEFE API - Edit a unit #13

@franck-boullier

Description

@franck-boullier

This describes the MEFE API to edit a Unee-T unit.
unee-t/frontend#740 for more details.

The Payload needed by the MEFE API:

{
	"actionType": "EDIT_UNIT",
	"requestorUserId": "R4vBD6BZRCNx8JwnM",
	"unitId": "FuFMO1O1ISXPmwtMB",
	"creatorId": "R4vBD6BZRCNx8JwnM",
	"type": "Hotel",
	"name": "Unit test yyyyyy",
	"moreInfo": "More info",
	"streetAddress": "123 asdjdsj",
	"city": "Singapore",
	"state": "---",
	"zipCode": "11111111",
	"country": "Singapore"
}

Example response:

{
    "timestamp": "2019-03-28T02:54:02.345Z"
}

The Payload generated by the SQL via Lambda:

{
	"updateUnitRequestId": 1,
	"actionType": "EDIT_UNIT",
	"requestorUserId": "R4vBD6BZRCNx8JwnM",
	"unitId": "FuFMO1O1ISXPmwtMB",
	"creatorId": "R4vBD6BZRCNx8JwnM",
	"type": "Hotel",
	"name": "Unit test yyyyyy",
	"moreInfo": "More info",
	"streetAddress": "123 asdjdsj",
	"city": "Singapore",
	"state": "---",
	"zipCode": "11111111",
	"country": "Singapore"
}

The SQL to run after the API returns a success:

SET @update_unit_request_id = `updateUnitRequestId` ;
SET @updated_datetime = `timestamp` ;  [(the SQL formatted timestamp of the reply from the MEFE API)]
CALL `ut_update_success_mefe_unit`;

@kaihendry Let me know when all is ready on your side (Golang) so I can test end to end.

Metadata

Metadata

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions