# we are facing some issues when we are calling create team-members API in with prod details same API is working fine in sandbox ENV

**URL:** <https://developer.squareup.com/forums/t/we-are-facing-some-issues-when-we-are-calling-create-team-members-api-in-with-prod-details-same-api-is-working-fine-in-sandbox-env/12468>\
**Category:** Questions\
**Tags:** team-api\
**Created:** [February 15, 2024, 5:37pm UTC](https://developer.squareup.com/forums/t/we-are-facing-some-issues-when-we-are-calling-create-team-members-api-in-with-prod-details-same-api-is-working-fine-in-sandbox-env/12468 "2024-02-15T17:37:26Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rajeshjazzhr](https://avatars.discourse-cdn.com/v4/letter/r/ee7513/32.png) [@rajeshjazzhr](https://developer.squareup.com/forums/u/rajeshjazzhr)\
**Post date:** [February 15, 2024, 5:37pm UTC](https://developer.squareup.com/forums/t/we-are-facing-some-issues-when-we-are-calling-create-team-members-api-in-with-prod-details-same-api-is-working-fine-in-sandbox-env/12468/1 "2024-02-15T17:37:26Z")

</div>

Prod API link - [https://connect.squareup.com/v2/team-members/](https://connect.squareup.com/v2/team-members/)\<candidate\_id\>/wage-setting  
Header - Square-Version:2024-01-18  
Authorization:Bearer \<Access\_token\>  
Content-Type:application/json

sandbox API link - [https://connect.squareupsandbox.com/v2/team-members/](https://connect.squareupsandbox.com/v2/team-members/)\<candidate\_id\>/wage-setting  
Header - Square-Version:2024-01-18  
Authorization:Bearer \<Access\_token\>  
Content-Type:application/json

API body - {  
“wage\_setting”: {  
“is\_overtime\_exempt”: true,  
“team\_member\_id”: “\<candidate\_id\>”,  
“job\_assignments”: [  
{  
“job\_title”: “Manager”,  
“pay\_type”: “SALARY”,  
“annual\_rate”: {  
“amount”: 2500000,  
“currency”: “USD”  
},  
“weekly\_hours”: 40  
},  
{  
“job\_title”: “Cashier”,  
“pay\_type”: “HOURLY”,  
“hourly\_rate”: {  
“amount”: 1200,  
“currency”: “USD”  
}  
}  
]  
}  
}

---

<div class="post-metadata">

**Author:** ![Bryan-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/bryan-square/32/38_2.png) [@Bryan-Square](https://developer.squareup.com/forums/u/Bryan-Square)\
**Post date:** [February 15, 2024, 6:14pm UTC](https://developer.squareup.com/forums/t/we-are-facing-some-issues-when-we-are-calling-create-team-members-api-in-with-prod-details-same-api-is-working-fine-in-sandbox-env/12468/2 "2024-02-15T18:14:29Z")

</div>

This looks to be an invalid entity.

- Invalid [JobAssignment](https://developer.squareup.com/reference/square/objects/JobAssignment) An object describing a job that a team member is assigned to.Object objects are included in `job_assignments`. Common invalid job assignments include:
  - [pay\_type](https://developer.squareup.com/reference/square/objects/JobAssignment#definition__property-pay_type) The current pay type for the job assignment used to calculate the pay amount in a pay period.Property is `HOURLY` and [hourly\_rate](https://developer.squareup.com/reference/square/objects/JobAssignment#definition__property-hourly_rate) The hourly pay rate of the job.Property isn’t supplied.
  - [pay\_type](https://developer.squareup.com/reference/square/objects/JobAssignment#definition__property-pay_type) The current pay type for the job assignment used to calculate the pay amount in a pay period.Property is `HOURLY` and [annual\_rate](https://developer.squareup.com/reference/square/objects/JobAssignment#definition__property-annual_rate) The total pay amount for a 12-month period on the job. Set if the job PayType is SALARY.Property or [weekly\_hours](https://developer.squareup.com/reference/square/objects/JobAssignment#definition__property-weekly_hours) is supplied.
  - [pay\_type](https://developer.squareup.com/reference/square/objects/JobAssignment#definition__property-pay_type) The current pay type for the job assignment used to calculate the pay amount in a pay period.Property is `SALARY` and [annual\_rate](https://developer.squareup.com/reference/square/objects/JobAssignment#definition__property-annual_rate) The total pay amount for a 12-month period on the job. Set if the job PayType is SALARY.Property or [weekly\_hours](https://developer.squareup.com/reference/square/objects/JobAssignment#definition__property-weekly_hours) isn’t supplied.
  - [pay\_type](https://developer.squareup.com/reference/square/objects/JobAssignment#definition__property-pay_type) The current pay type for the job assignment used to calculate the pay amount in a pay period.Property is `SALARY` and [hourly\_rate](https://developer.squareup.com/reference/square/objects/JobAssignment#definition__property-hourly_rate) The hourly pay rate of the job.Property is supplied but the amount doesn’t match the product of [hourly\_rate](https://developer.squareup.com/reference/square/objects/JobAssignment#definition__property-hourly_rate) The hourly pay rate of the job.Property multiplied by [weekly\_hours](https://developer.squareup.com/reference/square/objects/JobAssignment#definition__property-weekly_hours) The planned hours per week for the job. Set if the job PayType is SALARY.Property.
  - [pay\_type](https://developer.squareup.com/reference/square/objects/JobAssignment#definition__property-pay_type) The current pay type for the job assignment used to calculate the pay amount in a pay period.Property is `NONE` and [hourly\_rate](https://developer.squareup.com/reference/square/objects/JobAssignment#definition__property-hourly_rate) The hourly pay rate of the job.Property, [annual\_rate](https://developer.squareup.com/reference/square/objects/JobAssignment#definition__property-annual_rate), or [weekly\_hours](https://developer.squareup.com/reference/square/objects/JobAssignment#definition__property-weekly_hours) is supplied.
  - The amount of [annual\_rate](https://developer.squareup.com/reference/square/objects/JobAssignment#definition__property-annual_rate) The total pay amount for a 12-month period on the job. Set if the job PayType is SALARY.Property or [hourly\_rate](https://developer.squareup.com/reference/square/objects/JobAssignment#definition__property-hourly_rate) is negative.
  - The currency of [annual\_rate](https://developer.squareup.com/reference/square/objects/JobAssignment#definition__property-annual_rate) The total pay amount for a 12-month period on the job. Set if the job PayType is SALARY.Property or [hourly\_rate](https://developer.squareup.com/reference/square/objects/JobAssignment#definition__property-hourly_rate) does match the currency of the Square account.
  - [job\_title](https://developer.squareup.com/reference/square/objects/JobAssignment#definition__property-job_title) is duplicated.  
🙂

---

<div class="post-metadata">

**Author:** ![rajeshjazzhr](https://avatars.discourse-cdn.com/v4/letter/r/ee7513/32.png) [@rajeshjazzhr](https://developer.squareup.com/forums/u/rajeshjazzhr)\
**Post date:** [February 16, 2024, 6:12am UTC](https://developer.squareup.com/forums/t/we-are-facing-some-issues-when-we-are-calling-create-team-members-api-in-with-prod-details-same-api-is-working-fine-in-sandbox-env/12468/3 "2024-02-16T06:12:47Z")

</div>

Hi Brayan,

Same job entity is working on sandbox env could you please check then why it is working on sandbox and not working on production.

{  
“wage\_setting”: {  
“is\_overtime\_exempt”: true,  
“team\_member\_id”: “TMNvhfdocEnUbOBq”,  
“job\_assignments”: [  
{  
“job\_title”: “Manager”,  
“pay\_type”: “SALARY”,  
“annual\_rate”: {  
“amount”: 1500000,  
“currency”: “USD”  
},  
“weekly\_hours”: 40  
},  
{  
“job\_title”: “Cashier”,  
“pay\_type”: “HOURLY”,  
“hourly\_rate”: {  
“amount”: 1200,  
“currency”: “USD”  
}  
}  
]  
}  
}

Thanks,  
Rajesh Kharatmol

---

<div class="post-metadata">

**Author:** ![Bryan-Square](https://sea1.discourse-cdn.com/square/forums/user_avatar/developer.squareup.com/bryan-square/32/38_2.png) [@Bryan-Square](https://developer.squareup.com/forums/u/Bryan-Square)\
**Post date:** [February 16, 2024, 5:37pm UTC](https://developer.squareup.com/forums/t/we-are-facing-some-issues-when-we-are-calling-create-team-members-api-in-with-prod-details-same-api-is-working-fine-in-sandbox-env/12468/4 "2024-02-16T17:37:52Z")

</div>

It looks like your passing in an hourly and a salary for this employee. This is listed as one of the invalid job assignments. I’ll be sure to check the sandbox behavior. 🙂
