Related Documents
Document Properties
Kbid2764P2
Last Modified23-Jun-2020
Added to KB29-Jun-2016
Public AccessEveryone
StatusOnline
Doc TypeReferences
Product
  • ICM 7.8
  • ICM 7.9
  • ICM 7.10

REST API - Punchout - Update Punchout user information


Note

Starting with 7.10 our REST API is documented using Redoc accessible at docs.intershop.com.

URI

/customers/<customer-id>/punchouts/<punchout-id>/users/<user-id>

Http Method

PUT

Short Description

Update Punchout user data

Query Parameters

none

Example Requests

/customers/AgroNet/punchouts/oci/users/oci1

HTTP Status Codes

200 OK

400 Bad Request

Possible values for header 'error-key':

  • punchout.password_invalid.error

401 Unauthorized

403 Forbidden

404 Not found

Possible values for header 'error-key':
    • punchout.punchout_user_not_found.error

Description

Update information of a Punchout user. The authenticated user must have the permission APP_B2B_MANAGE_PUNCHOUT.

The following user attributes can be updated:

  • email - notifications for the Punchout user are send to this email address
  • password - the configured password for the Punchout user
  • active - flag to enable/disable the Ppunchout user

All attributes are optional see request code examples below.

Cartridge

app_sf_rest_b2b

ApplicationSMB Web Shop

Product Version

7.8

Product To Version

 
Status

final

JSON

Request Data Format

application/json

Request related java object

com.intershop.application.storefront.rest.b2b.capi.punchout.resource.PunchoutUserItemResource
com.intershop.application.storefront.rest.b2b.capi.punchout.handler.PunchoutUserHandler
com.intershop.application.storefront.rest.b2b.capi.punchout.resourceobject.PunchoutUserRO

Request Example

Update the Punchout user's email address only.

Update email address
{
	"email": "ociuser@test.intershop.de"
}

Update the Punchout user's password only. Invalid password would return a bad request and the header field error-key: "punchout.password_invalid.error" would be set.

Update password
{
	"password": "!InterShop00!"
}

Set only the Punchout user's status to active or inactive

Enable/Disable punchout user
{
	"active": false
}

or set all fields at once.

Combined Update of email and password
{
	"email": "ociuser@test.intershop.de",
	"password": "!InterShop00!",
	"active": false
}

Response Data Format

application/json

Response related java object

com.intershop.application.storefront.rest.b2b.capi.punchout.resource.PunchoutUserItemResource
com.intershop.application.storefront.rest.b2b.capi.punchout.handler.PunchoutUserHandler
com.intershop.application.storefront.rest.b2b.capi.punchout.resourceobject.PunchoutUserRO

Response Example

{
	"type": "PunchoutUser",
	"id": "oci1",
	"email": "ociuser@test.intershop.de",
	"login": "oci1",
	"password": "*****",
	"active": false
}

XML

XML Request Data Format

text/xml

XML Request Java Objects

com.intershop.application.storefront.rest.b2b.capi.punchout.resource.PunchoutUserItemResource
com.intershop.application.storefront.rest.b2b.capi.punchout.handler.PunchoutUserHandler
com.intershop.application.storefront.rest.b2b.capi.punchout.resourceobject.PunchoutUserRO

XML Request Example

Update the Punchout user's email address only.

Update email address
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<PunchoutUser type="PunchoutUser">
	<email>ociuser@test.intershop.de</email>
</PunchoutUser>

Update the Punchout user's password only. Invalid password would return a bad request and the header field error-key: "punchout.password_invalid.error" would be set.

Update password
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<PunchoutUser type="PunchoutUser">
	<password>newPassword</password>
</PunchoutUser>

Set only the Punchout user's status to active or inactive

Enable/Disable punchout user
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<PunchoutUser type="PunchoutUser">
	<active>false</active>
</PunchoutUser>

or set all fields at once.

Combined Update of email and password
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<PunchoutUser type="PunchoutUser">
	<email>ociuser@test.intershop.de</email>
	<password>!123newPassword</password>
	<active>false</active>
</PunchoutUser>

XML Response Data Format

text/xml

XML Response Java Objects

com.intershop.application.storefront.rest.b2b.capi.punchout.resource.PunchoutUserItemResource
com.intershop.application.storefront.rest.b2b.capi.punchout.handler.PunchoutUserHandler
com.intershop.application.storefront.rest.b2b.capi.punchout.resourceobject.PunchoutUserRO

XML Response Example

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<PunchoutUser type="PunchoutUser">
	<id>oci1</id>
	<email>ociuser@test.intershop.de</email>
	<login>oci1</login>
	<password>*****</password>
	<active>false</active>
</PunchoutUser>

Disclaimer

The information provided in the Knowledge Base may not be applicable to all systems and situations. Intershop Communications will not be liable to any party for any direct or indirect damages resulting from the use of the Customer Support section of the Intershop Corporate Web site, including, without limitation, any lost profits, business interruption, loss of programs or other data on your information handling system.

Customer Support
Knowledge Base
Product Resources
Support Tickets