Creating and Managing Proof of Service with Proof of Service API for Suppliers
Use this procedure to create and manage proof of service with Proof of Service API for suppliers.
Context
Procedure
- The client application posts the request, specifying the parameters to create a PoS. This request posts a create job to the queue.
where {anid} is the SAP Business Network ID of the user who creates the PoS.
The user ID of the user who creates the PoS is given as input to the header parameter X-UserId. The payload is given as input to the parameter payload.
Proof of Service Payload Parameters: action
Action is publish when supervisor is creating the PoS on behalf of the contractor. In other scenarios, this parameter is not used.
proofOfService.documentNumber
Unique number given to the proof of service by the user. This is mandatory.
proofOfService.location
Location or site code of the service. This is mandatory.
proofOfService.startDate
Date and time of the start of the service. This is mandatory.
proofOfService.endDate
Date and time of the end of the service. This is mandatory.
proofOfService.dueDate
Date by which the service is to be completed. This is entered by PoS Assigner.
proofOfService.desc
Description of the service. This is mandatory.
proofOfService.contractor.userId
User ID of the contractor. This is mandatory.
proofOfService.reviewer.userId
User ID of the reviewer. This is mandatory.
proofOfService.approver.userId
User ID of the approver from the buyer organization.
proofOfService.accountingName
Accounting code for the PoS.
proofOfService.po.buyerANID
SAP Business Network ID of the buyer organization.
proofOfService.po.payloadId
Payload ID of the purchase order (PO).
proofOfService.po.documentNumber
PO number.
proofOfService.po.documentDate
Date and time of creation of the PO.
proofOfService.projectCode
Generic code of the project.
proofOfService.posItems.{posLineNumber}.lineNumber
Line number of the PoS item.
proofOfService.posItems.{posLineNumber}.poLineNumber
Line number of the PO service or material line item from which the PoS line item is derived.
proofOfService.posItems.{posLineNumber}.itemType
Service or material.
proofOfService.posItems.{posLineNumber}.desc
Description of the item.
proofOfService.posItems.{posLineNumber}.quantity
Quantity of the item.
proofOfService.posItems.{posLineNumber}.chargeableQuantity
Chargeable quantity of the item.
proofOfService.posItems.{posLineNumber}.unitOfMeasure
Unit of measure of the material or service.
proofOfService.posItems.{posLineNumber}.unitPrice
Price per unit of the item.
proofOfService.posItems.{posLineNumber}.startDate
Start date and time of the service. This date should be between proofOfService.startDate and proofOfService.endDate.
proofOfService.posItems.{posLineNumber}.endDate
End date and time of the service. This date should be between proofOfService.startDate and proofOfService.endDate.
proofOfService.posItems.{posLineNumber}.currencyCode
Currency code for the payment of the material or service.
proofOfService.posItems.{posLineNumber}.comments
Comments about the PoS line item.
The status of the create operation is returned.
- The client application posts the request to get the list of users for PoS, specifying the parameters to get the list of users for the PoS. This request posts a get job to the queue.
where {role} is the role corresponding to the user list to be returned. The value of {role} can be contractor, reviewer, or approver. To retrieve the list of contractors or reviewers, {anid} is the SAP Business Network ID of the supplier. To retrieve the list of approvers, {anid} is the SAP Business Network ID of the buyer.
Using this API, the user can retrieve the following information:-
Contractor can retrieve the list of reviewers to assign PoS for review.
-
Supplier user can retrieve the list of contractors to create a PoS on behalf of a contractor.
-
Supplier user can retrieve the list of reviewers to add other reviewers for the PoS they created on behalf of a contractor.
-
Supplier user can retrieve the list of approvers to add the approver for the PoS they review.
The user list based on the Proof of Service API for suppliers request is returned.
-
- The client application posts the request to view proof of service.
- To view a specific PoS:
where {anid} is the SAP Business Network ID of the user who requests to view the PoS and {supplierAnid} is the SAP Business Network ID of the supplier organization. documentNumber is the PoS document number.
- To view all the PoS based on a specific filter criterion::
where {anid} is the SAP Business Network ID of the user who requests to view the PoS and {supplierAnid} is the SAP Business Network ID of the supplier organization. Here {filterCriterion} is the filter criterion and {value} is the value based on which multiple PoS can be viewed..
The following table describes the auto-generated parameters in a PoS:
Auto-Generated PoS Parameters Relevant to View Operation of TheAPI: Parameter
Description
proofOfService.creator.userId
User ID of the creator of the PoS.
proofOfService.creator.firstName
First name of the creator of the PoS.
proofOfService.creator.lastName
Last name of the creator of the PoS.
proofOfService.creator.anid
SAP Business Network ID of the supplier organization.
proofOfService.totalAmt
Sum of the product of proofOfService.posItems.{posLineNumber}.chargeableQuantity and proofOfService.posItems.{posLineNumber}.unitPrice for all PoS line items.
proofOfService.createDate
Date and time of the creation of the PoS.
The following table describes the parameters that can be viewed based on user persona:
PoS Parameters That Can Be Viewed Based on User Persona User Persona
Parameters That Can Be Viewed
Contractor
All PoS parameters except purchase order parameters, proofOfService.projectCode, proofOfService.accountingName, proofOfService.approver.userId, proofOfService.totalAmt, and PoS line item parameters proofOfService.posItems.{posLineNumber}.chargeableQuantity, proofOfService.posItems.{posLineNumber}.unitPrice, and proofOfService.posItems.{posLineNumber}.currencyCode.
PoS Assigner
All PoS parameters.
Supervisor
All PoS parameters.
Approver
All PoS parameters.
You can specify the maximum number of PoS displayed per page as the input for the header parameter maxPageSize. For example, if you input five as maxPageSize and the list returned has 20 PoS, five PoS records are displayed per page. By default, the value of maxPageSize is 100.
PoS can be filtered and viewed based on the following criteria:
Filter Parameters for View Operation of Proof of Service API for Suppliers: Filter Criterion
Description
status
Status of the PoS. This corresponds to proofOfService.status.
contractor
User ID of the contractor. This corresponds to proofOfService.contractor.userId.
reviewer
User ID of the reviewer. This corresponds to proofOfService.reviewer.userId.
approver
User ID of the approver. This corresponds to proofOfService.approver.userId.
createdBy
User ID of the creator of the PoS. This corresponds to proofOfService.creator.userId.
location
Location specified in the PoS. This corresponds to proofOfService.location.
startDate
Date and time of the start of the service. This corresponds to proofOfService.startDate.
endDate
Date and time of the end of the service. This corresponds to proofOfService.endDate.
poDocument
Purchase order number. This corresponds to proofOfService.po.documentNumber.
Example: GET {{runtime_url}}/proofOfServices/pages1?anid=AN00000000001&$filter=status eq 'BUYER_APPROVED' and location eq 'Campus1'If the user requested to view a specific PoS, the PoS with the requested document number is returned. If the user requested to view a list of PoS, the PoS list is returned.
- To view a specific PoS:
- The client application posts the following request to add an attachment to a PoS:
where {anid} is the SAP Business Network ID of the user who requests to add the attachment and {supplierAnid} is the SAP Business Network ID of the supplier organization. documentNumber is the PoS document number.
Proof of Service Parameters Relevant to PoS Attachments Field
Description
proofOfService.posAttachments.fileName
File name of the PoS attachment
proofOfService.posAttachments.size
Size of the PoS attachment.
proofOfService.posAttachments.contentType
File type or format of the PoS attachment.
proofOfService.posAttachments.cid
Content ID for the PoS attachment.
Example: POST {{runtime_url}}/proofOfServices/PoS_0001/attachments?anid=AN0000000001&supplierAnid=AN00000000002Upload attachments to the specified PoS against the parameter file.
The status of the operation is returned.
- The client application posts the following request to download an attachment to a PoS:
where {cid} is the content ID of the PoS attachment to be downloaded, {anid} is the SAP Business Network ID of the user who requests to download the attachment and {supplierAnid} is the SAP Business Network ID of the supplier organization. documentNumber is the PoS document number.
Example: GET {{runtime_url}}/proofOfServices/PoS_0001/attachments/121324fnvkjfbnvcvbjhjknf?anid=AN00000000001&supplierAnid=AN00000000002If the operation is successful, the requested file is downloaded. If the operation fails, the error details are returned.
- The client application posts the request, specifying the parameters to update a PoS:
where {anid} is the SAP Business Network ID of the user who updates the PoS and {documentNumber} is the document number of the PoS. {supplierAnid} is the SAP Business Network ID of the supplier.
Proof of Service Parameters Relevant to Update Operation of Proof of Service API for Suppliers Field
Description
proofOfService.status
Current status of the PoS.
proofOfService.posStatus
Updated status of the PoS.
proofOfService.supervisorReviewComment
Comment added by the supervisor about the PoS review.
proofOfService.buyerComment
Comment added by the buyer about the PoS approval or rejection.
The following table describes the parameters that can be updated based on user persona:
PoS Parameters That Can Be Updated Based on User Persona User Persona
Parameters That Can Be Updated
Contractor
All PoS parameters except PO parameters action, proofOfService.contractor.userId, proofOfService.posItems.{posLineNumber}.chargeableQuantity, proofOfService.creator.userId, proofOfService.projectCode, proofOfService.accountingName, proofOfService.approver.userId, proofOfService.creator.firstName, proofOfService.creator.lastName, proofOfService.creator.anid, proofOfService.totalAmt, proofOfService.posItems.{posLineNumber}.currencyCode, proofOfService.posItems.{posLineNumber}.unitPrice, and proofOfService.createDate.
PoS Assigner
proofOfService.posStatus, proofOfService.contractor.userId, proofOfService.reviewer.userId, and proofOfService.approver.userId.
Supervisor
All PoS parameters except action, proofOfService.documentNumber, proofOfService.posItems.{posLineNumber} parameters, proofOfService.contractor.userId, proofOfService.reviewer.userId, proofOfService.creator.userId, proofOfService.creator.firstName, proofOfService.creator.lastName, proofOfService.creator.anid, proofOfService.totalAmt, and proofOfService.createDate.
Approver
proofOfService.posStatus, proofOfService.accountingName, and proofOfService.buyerComment.
The PoS details can be updated based on the user's role and the status of the PoS.
These are the different values for PoS status:
PoS Status
Description
PENDING_WORK_LOG
The PoS is created by a supplier user on behalf of the contractor. The service details are pending from the contractor.
CONTRACTOR_REJECTED
The PoS is created by a supplier user on behalf of the contractor and is rejected by the contractor. The supplier user can assign the PoS to another contractor.
CONTRACTOR_ACCEPTED
The PoS is created by a supplier user on behalf of the contractor and is accepted by the contractor.
PENDING_REVIEW
The PoS is pending review by the supervisor.
PENDING_PO_ASSIGNMENT
The PoS is pending the assignment of purchase order information.
SUPERVISOR_REJECTED
The PoS is rejected by the supervisor.
PENDING_APPROVAL
The PoS is pending approval by the buyer.
APPROVED
The PoS is approved by the buyer.
BUYER_REJECTED
The PoS is rejected by the buyer.
The following parameters can be updated by users with different roles, based on the PoS status:
PoS Status
Contractor
Supplier User Who Creates PoS on Behalf of Contractor
Supervisor (Reviewer)
Buyer (Approver)
PENDING_WORK_LOG
posStatus
posStatus, contractor.userId, reviewer.userId, approver.userId
None
None
CONTRACTOR_REJECTED
None
posStatus, contractor.userId
None
None
CONTRACTOR_ACCEPTED
posStatus, location, desc, startDate, endDate, file, and all posItems parameters except posItems.{posLineNumber}.poLineNumber
None
None
None
PENDING_REVIEW
None
None
posStatus, location, desc, startDate, endDate, accountingName, projectCode, approver.userId, posItems.{posLineNumber}.desc, posItems.{posLineNumber}.startDate, posItems.{posLineNumber}.endDate, posItems.{posLineNumber}.itemType, posItems.{posLineNumber}.comments, posItems.{posLineNumber}.chargeableQuantity, file, and all po parameters
None
PENDING_PO_ASSIGNMENT
None
None
posStatus, accountingName, projectCode, approver.userId, and all po parameters
None
SUPERVISOR_REJECTED
None
None
None
None
PENDING_APPROVAL
None
None
None
posStatus, accountingName, buyerComment
APPROVED
None
None
None
None
BUYER_REJECTED
None
None
None
None
The following table lists the possible status changes when PoS status is a specific value:
PoS Status
Next Possible Status
PENDING_WORK_LOG
CONTRACTOR_ACCEPTED or CONTRACTOR_REJECTED
CONTRACTOR_REJECTED
PENDING_WORK_LOG
CONTRACTOR_ACCEPTED
PENDING_REVIEW
PENDING_REVIEW
PENDING_PO_ASSIGNMENT, SUPERVISOR_REJECTED, or PENDING_APPROVAL
PENDING_PO_ASSIGNMENT
PENDING_APPROVAL
SUPERVISOR_REJECTED
None
PENDING_APPROVAL
APPROVED or BUYER_REJECTED
APPROVED
None
BUYER_REJECTED
None
The status of the update operation is returned.