abc@tmforum.com" } }, { "type": "PostalAddress", "validFor": { "startDateTime": "2013-04-19T16:42:23.0Z" }, "medium": { "city": "Wien", "country": "Austria", "postcode": "1020", "stateOrProvince": "Quebec", "street1": "Lassallestrasse7", "street2": "" } }, { "type": "TelephoneNumber", "validFor": { "startDateTime": "2013-04-19T16:42:23.0Z" }, "medium": { "type": "mobile", "number": "+436641234567" } }, { "preferred": true, "type": "TelephoneNumber", "validFor": { "startDateTime": "2013-04-19T16:42:23.0Z" }, "medium": { "type": "business", "number": "+436641234567" } } ] } | RESPONSE | 201 Content-Type: application/json
{ JSON Resource Representation with all attributes } |
PATCH partyManagement/individual/{ID}This Uniform Contract operation is used to partially update the representation of an individual. Description: - Patch operation can be used partially update one or more individual
- The resource represents a managed entity or a collection
- The identifier is a string that can consist of numbers, not necessarily alphanumeric
Behavior: - Return Status Codes:
- Returns HTTP/1.1 status code 201 if individual was updated successfully
- 400 – Bad Request Error
- 404 - If no record was found for the supplied criteria
- 500 - The server encountered an unexpected condition which prevented it from fulfilling the request
Patchable attributes for an individual:
Attribute name | Patchable | Rule | id | N | | gender | Y | | placeOfBirth | N | | countryOfBirth | Y | | nationality | Y | | maritalStatus | Y | | disability | Y | | birthDate | N | | deathDate | Y | | characteristic | Y | | title | Y | | givenName | Y | | familyName | Y | | middleName | Y | | fullName | Y | | formattedName | Y | | otherName | Y | | location | Y | | individualIdentification | Y | | externalReference | Y | | relatedParty | Y | | contactMedium | Y | |
Further document any rules that must be implemented when patching attributes.
Rule name | Rule/Pre Condition/Side Effects/Post Conditions | disability | disability is mandatory | characteristic | name and value are mandatory | organizationIdentification | type and identification id must be set | externalReference | referenceType and reference must be set | relatedParty | role and party are mandatory startDateTime is not mandatory but has a default value -> it is set to sysdate by default | xxxRelationship | relationshipType and href are mandatory |
Example : Update John Doe (identified with '11') : he is updating his marital status.
REQUEST | PATCH partyManagement/individual/11 Content-type: application/json { "maritalStatus": "married" } | RESPONSE | 201 Content-Type: application/json
{ JSON resource representation with all attributes including the changed one See individual resource model for details } |
Example : Update John Doe (identified with '11') : he is joining an organization that is already stored in the party referential.
REQUEST | PATCH partyManagement/individual/11 Content-type: application/json-patch+json { "op": "add", "path": "/relatedParty", "value": { "id": "1", "href": "http://serverlocation:port/partyManagement/organization/1", "role": "Employee", "validFor": { "startDateTime": "2013-04-19T16:42:23-04:00", "endDateTime": "" } } } | RESPONSE | 201 Content-Type: application/json
{ JSON resource representation with all attributes including the changed one See individual resource model for details } |
PATCH partyManagement/organization/{ID}This Uniform Contract operation is used to partially update the representation of an organization Description: - Patch operation can be used partially update one or more organizations
- The resource represents a managed entity or a collection
- The identifier is a string that can consist of numbers, not necessarily alphanumeric
Behavior: - Return Status Codes:
- Returns HTTP/1.1 status code 201 if organization was updated successfully
- 400 – Bad Request Error
- 404 - If no record was found for the supplied criteria
- 500 - The server encountered an unexpected condition which prevented it from fulfilling the request
Patchable attributes for an organization: Attribute name | Patchable | Rule | id | N | | isLegalEntity | Y | | type | Y | | existsDuring | Y | | tradingName | Y | | nameType | Y | | otherName | Y | | characteristic | Y | | organizationIdentification | Y | | externalReference | Y | | relatedParty | Y | | organizationParentRelationship | Y | | organizationChildRelationship | Y | | contactMedium | Y | |
Further document any rules that must be implemented when patching attributes.
Rule name | Rule/Pre Condition/Side Effects/Post Conditions | characteristic Patching Mandatory Values | Name and value | organizationIdentification Patching Mandatory Values | Type and identificationId | externalReference Patching Mandatory Values | referenceType and reference | relatedParty Patching Mandatory Values | Role and party | relatedParty Patching Default Values | startDateTime is not mandatory is set to sysdate by default |
Example : Example of an organization structure which is changing : IT and Network were previously separated and a new entity was created to merge these two entities (IT&N) We describe 2 PATCH operations here under :
- PATCH IT entity to tag it as former
- PATCH main organization to change the organization structure (children links)
Organization (id : 131) IT (id : 1311) Network (id : 1312) IT&N (id : 1319) We assume that IT&N is already created, and Network entity has been patched. PATCH of the IT entity :
REQUEST | PATCH partyManagement/organization/1311 Content-type: application/json { "id": "1311", "href": " http://serverlocation:port/partyManagement/organization/1311", "existsDuring": { "endDate": "2013-04-19T16:42:23-04:00" } } | RESPONSE | 201 Content-Type: application/json
{ JSON resource representation with all attributes including the changed one See individual resource model for details } |
PATCH of the Organization top entity : set the relationships endDate for IT & Network relationships, and creation of a new relationship with IT&N
REQUEST | PATCH partyManagement/organization/131 Content-type: application/json-patch+json [ { "op": "replace", "path": "/organizationChildRelationship/1", "value": { "relationshipType": "Juridical", "id": "1311", "href": "http://serverlocation:port/partyManagement/organization/1311", "validFor": { "startDateTime": "2001-04-19T16:42:23-04:00", "endDateTime": "2013-04-19T16:42:23-04:00" } } }, { "op": "replace", "path": "/organizationChildRelationship/2", "value": { "relationshipType": "Juridical", "id": "1311", "href": "http: //serverlocation: port/partyManagement/organization/1312", "validFor": { "startDateTime": "2001-04-19T16: 42: 23-04: 00", "endDateTime": "2013-04-19T16:42:23-04:00" } } }, { "op": "add", "path": "/organizationChildRelationship", "value": { "relationshipType": "Juridical", "id": "1319", "href": "http: //serverlocation: port/partyManagement/organization/1319", "validFor": { "startDateTime": "2013-04-19T16:42:23-04:00", "endDateTime": "" } } } ] | RESPONSE | 201 Content-Type: application/json
{ JSON resource representation with all attributes including the changed one See individual resource model for details } |
POST partyManagement/individualThis operation is used to create an individual. - The identifier is a string that can consist of numbers, not necessarily alphanumeric
- The mandatory element(s) is/are
When using following elements there are some mandatory attributes within each element: - Within "disability"
- Within "characteristic"
- Within "organizationIdentification"
- Within "externalReference"
- Within "relatedParty"
- Role
- Party
- startDateTime -> not mandatory is set to sysdate by default
- Within "xxxRelationship"
- relationshipType
- ref
- startDateTime -> not mandatory is set to sysdate by default
- The id is generated automatically
Behavior: - Return Status Codes:
- 201 – Individual create successfully
- 400 – Bad Request Error
- 500 - The server encountered an unexpected condition which prevented it from fulfilling the request
Attribute name | Mandatory | Default | Rule | id | N | Automatically generated | If not given, the id is generated by the system. It is also possible to add an ID in the POST request, which is then used | gender | N | | | placeOfBirth | N | | | countryOfBirth | N | | | nationality | N | | | maritalStatus | N | | | disability | N | | | birthDate | N | | | deathDate | N | | | characteristic | N | | | title | N | | | givenName | Y | | | familyName | Y | | | middleName | N | | | fullName | N | | | formattedName | N | | | otherName | N | | | location | N | | | individualIdentification | N | | | externalReference | N | | | relatedParty | N | | | contactMedium | N | | |
Further specify any rules on the creation of the entity
Rule name | Rule/Pre Condition/Side Effects/Post Conditions | disability | disability is mandatory | characteristic | name and value are mandatory | organizationIdentification | type and identification id must be set | externalReference | referenceType and reference must be set | relatedParty | role and party are mandatory startDateTime is not mandatory but has a default value -> it is set to sysdate by default | xxxRelationship | relationshipType and ref are mandatory |
Example : creation of an individual named John Doe
REQUEST | POST partyManagement/individual Content-type: application/json
{ "gender": "male", "placeOfBirth": "http://goo.gl/maps/l8F9L", "countryOfBirth": "Austria", "nationality": "Canadian", "maritalStatus": "never married", "disability": [ { "disability": "blind" } ], "birthDate": "2014-03-05", "characteristic": [ { "name": "hobby", "value": "hockey" } ], "title": "Dr", "givenName": "John", "familyName": "Doe", "location": "http://goo.gl/maps/l8F9L", "individualIdentification": [ { "type": "Passport", "identificationId": "73736625252", "issuingAuthority": "", "issuingDate": "2013-06-19T00:00:00-04:00" } ], "externalReference": [ { "href": "http://facebook.com/17263635", "type": "FacebookID"
} ], "contactMedium": [ { "type": "Email", "validFor": { "startDateTime": "2013-04-19T16:42:23-04:00", "endDateTime": "" }, "medium": { "emailAddress": " |
|