# Collection runner and Memsource API

**URL:** <https://community.postman.com/t/collection-runner-and-memsource-api/18920>\
**Category:** Help Hub\
**Tags:** variables, collections\
**Created:** [January 7, 2021, 10:31am UTC](https://community.postman.com/t/collection-runner-and-memsource-api/18920 "2021-01-07T10:31:38Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![wmocek](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/wmocek/32/6841_2.png) [@wmocek](https://community.postman.com/u/wmocek)\
**Post date:** [January 7, 2021, 10:31am UTC](https://community.postman.com/t/collection-runner-and-memsource-api/18920/1 "2021-01-07T10:31:39Z")

</div>

Hello.  
Attached is the collection and CSV file I am using:

> **[import\_users.csv](https://drive.google.com/file/d/1JLvFCm4G_tnv4dC8_DJOSDb3Qx_hWYJz/view?usp=sharing)**
>
> Google Drive file.

> **[import\_users.postman\_collection.json](https://drive.google.com/file/d/1xjOHEuCIhcweEtG399NelfYs9Ho5PWcO/view?usp=sharing)**
>
> Google Drive file.

What is wrong that I do keep getting 400.  
The call in question is documented here:

> **[Introduction - Phrase Developer Hub](https://developers.phrase.com/en/api/tms/latest/introduction)**

---

<div class="post-metadata">

**Author:** ![praveendvd](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/praveendvd/32/6796_2.png) [@praveendvd](https://community.postman.com/u/praveendvd)\
**Post date:** [January 7, 2021, 11:38am UTC](https://community.postman.com/t/collection-runner-and-memsource-api/18920/2 "2021-01-07T11:38:48Z")

</div>

your fields which take in boolean eg: mayEditApprovedTerms , and others are passed as **TRUE** instead of “ **true** ”. SO update your csv to have boolean to be **true**

and also in collection you have body as

```
{
"email": {{email}},
"mayEditApprovedTerms": {{mayEditApprovedTerms}}
}

```

but it should be like :

```
{
"email": "{{email}}",
"mayEditApprovedTerms": {{mayEditApprovedTerms}}
}

```

meaning all strings like email should be enclosed with double quotes “{{email}}” and boolean or numbers should be like as it is ( without double quotes) but should be passed as true instead of TRUE

---

<div class="post-metadata">

**Author:** ![wmocek](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/wmocek/32/6841_2.png) [@wmocek](https://community.postman.com/u/wmocek)\
**Post date:** [January 7, 2021, 3:14pm UTC](https://community.postman.com/t/collection-runner-and-memsource-api/18920/3 "2021-01-07T15:14:25Z")

</div>

Thank you very much for your reply.

1. You see **TRUE** in capital only because you preview the file in the browser, once you download the file and open in Notepad++ you’ll notice that it is actually **true** not **TRUE**
2. Here are the changes I have made to the collection:  
[import\_users.postman\_collection\_new.json - Google Drive](https://drive.google.com/file/d/1NjuSpoknXpwFwFXi95zbZx9CnNZqMePQ/view?usp=sharing)  
seems to be fine now.  
However the collection still fails to be run successfully.  
One more thing which worries me a bit that when I preview my CSV here:  
[https://i.imgur.com/nU87fqR.png](https://i.imgur.com/nU87fqR.png)  
I can see **true** values in quotes which I believe should not be the case.  
Any advice on the above?  
All the best  
Wojciech

---

<div class="post-metadata">

**Author:** ![praveendvd](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/praveendvd/32/6796_2.png) [@praveendvd](https://community.postman.com/u/praveendvd)\
**Post date:** [January 7, 2021, 4:10pm UTC](https://community.postman.com/t/collection-runner-and-memsource-api/18920/4 "2021-01-07T16:10:30Z")

</div>

use this you were missing some comma and closing brackets

```
{

  "userName": "{{userName}}",

  "firstName": "{{firstName}}",

  "lastName": "{{lastName}}",

  "email": "{{email}}",

  "password": "{{password}}",

  "role": "{{role}}",

  "timezone": "{{timezone}}",

  "note": "{{note}}",

  "mayEditApprovedTerms": {{mayEditApprovedTerms}},

  "mayRejectJobs": {{mayRejectJobs}},

  "editorMachineTranslateEnabled": {{editorMachineTranslateEnabled}},

  "receiveNewsletter": {{receiveNewsletter}},

  "mayEditTranslationMemory": {{mayEditTranslationMemory}},

  "sourceLangs": [

    "{{sourceLangs}}"

  ],

  "targetLangs": [

    "{{targetLangs}}"

  ],

  "workflowSteps": [

    {

      "id": "{{workflowSteps}}"

    }

  ],

  "clients": [

    {

      "id": "{{clients}}"

    }

  ],

  "domains": [

    {

      "id": "{{domains}}"

    }

  ],

  "subDomains": [

    {

      "id": "{{subDomains}}"

    }

  ],

  "projectBusinessUnits": [

    {

      "id": "{{projectBusinessUnits}}"

    }

  ],

  "automationWidgets": [

    {

      "id": "{{automationWidgets}}"

    }

  ]

}

```

Postman test script is smart enough to show json errors:

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/3/d/3d27cae9887e320425d6c6580ad9f345a9590718.png)

You can see what was actually received in collection runner by enabling save request:

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/a/6/a6a7e19981894ee1fdec80741ffd24aedf297af4.png)

response :

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/3/3/33d4f717d915909d966cb7e415f1e74b0022d40f.png)

so even the server response says where was the issue

---

<div class="post-metadata">

**Author:** ![wmocek](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/wmocek/32/6841_2.png) [@wmocek](https://community.postman.com/u/wmocek)\
**Post date:** [January 8, 2021, 9:31am UTC](https://community.postman.com/t/collection-runner-and-memsource-api/18920/5 "2021-01-08T09:31:29Z")

</div>

Thanks a lot for the hints.  
It indeed worked, the only problem I have experienced was that I cannot send empty values within CSV which is a problem as I do not want to pass any value sometimes.  
Any hint would be appreciated.  
All the best  
Wojciech

---

<div class="post-metadata">

**Author:** ![praveendvd](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/praveendvd/32/6796_2.png) [@praveendvd](https://community.postman.com/u/praveendvd)\
**Post date:** [January 9, 2021, 2:53pm UTC](https://community.postman.com/t/collection-runner-and-memsource-api/18920/6 "2021-01-09T14:53:29Z")

</div>

You can pass empty values , blank column will be passed as “”

If you want to pass something else then you can use local variable

`pm.variables.set("key","value")`

If you want environment value to get reflected instead of value from data csv use :

`pm.variables.set("key",pm.environment.get("key"))`

Because precedence is as:

Local\>data\>environment so on (opposite of scope)

---

<div class="post-metadata">

**Author:** ![wmocek](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/wmocek/32/6841_2.png) [@wmocek](https://community.postman.com/u/wmocek)\
**Post date:** [January 11, 2021, 3:12pm UTC](https://community.postman.com/t/collection-runner-and-memsource-api/18920/7 "2021-01-11T15:12:11Z")

</div>

Thanks for following up.  
When I leave a value for the key empty in my CSV I am getting this error:

 ![image](https://us1.discourse-cdn.com/getpostman/original/3X/0/a/0a44dd9c6cf5fa191bacdf15aa552a9edb524a54.png)  
All the best  
Wojciech
